Skip to content

Commit 2f8249a

Browse files
committed
Fix TS options definition to include unwindArrays, useLocaleFormat
As was pointed out in #158, the unwindArrays option was missing from the TypeScript definitions. After further investigation, it was also found that useLocaleFormat was missing. Both options were added to the TypeScript options definitions in this commit. Fixes #158
1 parent b25503f commit 2f8249a

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)