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 {
17
17
* @default false
18
18
*/
19
19
excelBOM ?: boolean ;
20
+
20
21
/**
21
22
* Specify the keys (as strings) that should be converted
22
23
*
23
24
* * If you have a nested object (ie. {info : {name: 'Mike'}}), then set this to ['info.name']
24
25
* * If you want all keys to be converted, then specify null or don't specify the option to utilize the default.
25
26
*/
26
27
keys ?: string [ ] ;
28
+
27
29
/**
28
30
* Should the header fields be trimmed
29
31
* @default false
30
32
*/
31
33
trimHeaderFields ?: boolean ;
34
+
32
35
/**
33
36
* Should the field values be trimmed? (in development)
34
37
* @default false
@@ -60,12 +63,25 @@ export interface IFullOptions extends ISharedOptions {
60
63
* @default true
61
64
*/
62
65
prependHeader ?: boolean ;
66
+
63
67
/**
64
68
* Should the header keys be sorted in alphabetical order
65
69
* @default false
66
70
*/
67
71
sortHeader ?: boolean ;
68
72
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
+
69
85
}
70
86
71
87
export function json2csv ( data : object [ ] ,
You can’t perform that action at this time.
0 commit comments