File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -17,18 +17,21 @@ export interface ISharedOptions {
1717 * @default false
1818 */
1919 excelBOM ?: boolean ;
20+
2021 /**
2122 * Specify the keys (as strings) that should be converted
2223 *
2324 * * If you have a nested object (ie. {info : {name: 'Mike'}}), then set this to ['info.name']
2425 * * If you want all keys to be converted, then specify null or don't specify the option to utilize the default.
2526 */
2627 keys ?: string [ ] ;
28+
2729 /**
2830 * Should the header fields be trimmed
2931 * @default false
3032 */
3133 trimHeaderFields ?: boolean ;
34+
3235 /**
3336 * Should the field values be trimmed? (in development)
3437 * @default false
@@ -60,12 +63,25 @@ export interface IFullOptions extends ISharedOptions {
6063 * @default true
6164 */
6265 prependHeader ?: boolean ;
66+
6367 /**
6468 * Should the header keys be sorted in alphabetical order
6569 * @default false
6670 */
6771 sortHeader ?: boolean ;
6872
73+ /**
74+ * Should array values be "unwound" such that there is one line per value in the array?
75+ * @default false
76+ */
77+ unwindArrays ?: boolean ;
78+
79+ /**
80+ * Should values be converted to a locale specific string?
81+ * @default false
82+ */
83+ useLocaleFormat ?: boolean ;
84+
6985}
7086
7187export function json2csv ( data : object [ ] ,
You can’t perform that action at this time.
0 commit comments