Skip to content

Commit

Permalink
docs(csv-stringify): escape_formulas sample
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Mar 3, 2023
1 parent feae510 commit 8ee9bdb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/csv-stringify/samples/option.escape_formulas.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

import { stringify } from 'csv-stringify/sync';
import assert from 'assert';

const records = stringify([
['=1', '@2', '3'],
['=4', '@5', '6']
], {escape_formulas: true});

assert.equal(records, "'=1,'@2,3\n'=4,'@5,6\n")

0 comments on commit 8ee9bdb

Please sign in to comment.