Skip to content

Commit

Permalink
docs(csv-stringify): eof samples
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Oct 5, 2023
1 parent 74bf680 commit 8c1868e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/csv-stringify/samples/option.eof_false.js
@@ -0,0 +1,13 @@
import assert from "assert";
import { stringify } from "csv-stringify/sync";

const data = stringify(
[
["a", "b"],
["c", "d"],
],
{
eof: false,
}
);
assert.deepStrictEqual(data, "a,b\nc,d");
8 changes: 8 additions & 0 deletions packages/csv-stringify/samples/option.eof_true.js
@@ -0,0 +1,8 @@
import assert from "assert";
import { stringify } from "csv-stringify/sync";

const data = stringify([
["a", "b"],
["c", "d"],
]);
assert.deepStrictEqual(data, "a,b\nc,d\n");

0 comments on commit 8c1868e

Please sign in to comment.