Skip to content

Commit fcb1025

Browse files
authored
Add parseValue to type definitions (#213)
1 parent 628cc3e commit fcb1025

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/converter.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ export interface IFullOptions extends ISharedOptions {
109109
* Specify the keys that should be excluded from the output.
110110
*/
111111
excludeKeys?: string[];
112+
113+
/**
114+
* Specify how values should be converted into CSV format. This function is provided a single field value at a time and must return a `String`.
115+
* Note: Using this option may override other options, including `useDateIso8601Format` and `useLocaleFormat`.
116+
*/
117+
parseValue?: (fieldValue: any) => string;
112118
}
113119

114120
export function json2csv(data: object[],

0 commit comments

Comments
 (0)