spruce / generateCsv.ts
0 likes
0 forks
1 files
Last active
1 | const generateCsv = ( |
2 | rows: (string | number)[][], |
3 | headers: string[], |
4 | filename: string, |
5 | as: "download" | "contents" | "downloadInPlace", |
6 | ): string | undefined => { |
7 | if (typeof document === "undefined" && as !== "contents") { |
8 | throw new Error( |
9 | "This method does not support being used in a non-browser environment.", |
10 | ); |
Newer
Older