-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.d.ts
26 lines (26 loc) · 960 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* Parse takes a string of CSV data and converts it to a 2 dimensional array
*
* options
* - typed - infer types [false]
*
* @static
* @param {string} csv the CSV string to parse
* @param {Object} [options] an object containing the options
* @param {Function} [reviver] a custom function to modify the values
* @returns {Array} a 2 dimensional array of `[entries][values]`
*/
export function parse(csv: string, options?: any, reviver?: Function): any[];
/**
* Stringify takes a 2 dimensional array of `[entries][values]` and converts them to CSV
*
* options
* - eof - add a trailing newline at the end of file [true]
*
* @static
* @param {Array} array the input array to stringify
* @param {Object} [options] an object containing the options
* @param {Function} [replacer] a custom function to modify the values
* @returns {string} the CSV string
*/
export function stringify(array: any[], options?: any, replacer?: Function): string;