diff --git a/types/papaparse/index.d.ts b/types/papaparse/index.d.ts index 76f7c224b3..35353f3aba 100644 --- a/types/papaparse/index.d.ts +++ b/types/papaparse/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for PapaParse v4.1 // Project: https://github.com/mholt/PapaParse -// Definitions by: Pedro Flemming +// Definitions by: Pedro Flemming , Rain Shen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace PapaParse { diff --git a/types/papaparse/papaparse-tests.ts b/types/papaparse/papaparse-tests.ts index 32de7e109f..a432fc7f09 100644 --- a/types/papaparse/papaparse-tests.ts +++ b/types/papaparse/papaparse-tests.ts @@ -13,7 +13,7 @@ Papa.parse("3,3,3", { delimiter: ';', comments: false, - step: function(results, p) { + step: function (results, p) { p.abort(); results.data.length; } @@ -22,7 +22,7 @@ Papa.parse("3,3,3", { var file = new File(null, null, null); Papa.parse(file, { - complete: function(a, b) { + complete: function (a, b) { a.meta.fields; b.name; } @@ -31,13 +31,19 @@ Papa.parse(file, { /** * Unparsing */ -Papa.unparse([{a: 1, b: 1, c: 1}]); +Papa.unparse([{ a: 1, b: 1, c: 1 }]); Papa.unparse([[1, 2, 3], [4, 5, 6]]); Papa.unparse({ fields: ["3"], data: [] }); +Papa.unparse([{ a: 1, b: 1, c: 1 }], { quotes: false }); +Papa.unparse([[1, 2, 3], [4, 5, 6]], { delimiter: "," }); +Papa.unparse({ + fields: ["3"], + data: [] +}, { newline: "\n" }); /**