Skip to content

Commit 8ae4e7d

Browse files
authored
Merge pull request #159 from mrodrig/fix-158
Fix TS options definition to include unwindArrays, useLocaleFormat
2 parents b25503f + 2f8249a commit 8ae4e7d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/converter.d.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff 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

7187
export function json2csv(data: object[],

0 commit comments

Comments
 (0)