Skip to content

Commit 7490085

Browse files
authored
feat(csv/unstable): infer column names from object arrays for stringify() (denoland#6122)
1 parent 60b4917 commit 7490085

File tree

5 files changed

+397
-14
lines changed

5 files changed

+397
-14
lines changed

_tools/check_docs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const ENTRY_POINTS = [
4242
"../crypto/mod.ts",
4343
"../collections/mod.ts",
4444
"../csv/mod.ts",
45+
"../csv/unstable_stringify.ts",
4546
"../data_structures/mod.ts",
4647
"../data_structures/unstable_bidirectional_map.ts",
4748
"../datetime/mod.ts",

csv/deno.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"./parse": "./parse.ts",
77
"./parse-stream": "./parse_stream.ts",
88
"./stringify": "./stringify.ts",
9-
"./stringify-stream": "./stringify_stream.ts"
9+
"./stringify-stream": "./stringify_stream.ts",
10+
"./unstable-stringify": "./unstable_stringify.ts"
1011
}
1112
}

csv/stringify_test.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,6 @@ Deno.test({
8686
},
8787
},
8888
);
89-
await t.step(
90-
{
91-
name: "Invalid data, no columns",
92-
fn() {
93-
const data = [{ a: 1 }, { a: 2 }];
94-
assertThrows(
95-
() => stringify(data),
96-
TypeError,
97-
"No property accessor function was provided for object",
98-
);
99-
},
100-
},
101-
);
10289
await t.step(
10390
{
10491
name: "No data, no columns",

0 commit comments

Comments
 (0)