mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-11 22:37:31 +08:00
added test cases and author name
This commit is contained in:
2
types/papaparse/index.d.ts
vendored
2
types/papaparse/index.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
// Type definitions for PapaParse v4.1
|
||||
// Project: https://github.com/mholt/PapaParse
|
||||
// Definitions by: Pedro Flemming <https://github.com/torpedro>
|
||||
// Definitions by: Pedro Flemming <https://github.com/torpedro>, Rain Shen <https://github.com/rainshen49>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace PapaParse {
|
||||
|
||||
@@ -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" });
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user