@types/papaparse
Advanced tools
Comparing version 5.0.6 to 5.2.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for PapaParse v5.0 | ||
// Type definitions for PapaParse 5.2 | ||
// Project: https://github.com/mholt/PapaParse | ||
@@ -12,4 +12,4 @@ // Definitions by: Pedro Flemming <https://github.com/torpedro> | ||
// Raphaël Barbazza <https://github.com/rbarbazz> | ||
// Piotr Błażejewicz <https://github.com/peterblazejewicz> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.2 | ||
@@ -31,3 +31,3 @@ /// <reference types="node" /> | ||
*/ | ||
export const unparse: (data: Array<Object> | Array<Array<any>> | UnparseObject, config?: UnparseConfig) => string; | ||
export function unparse(data: object[] | any[][] | UnparseObject, config?: UnparseConfig): string; | ||
@@ -38,10 +38,10 @@ /** | ||
// An array of characters that are not allowed as delimiters. | ||
export const BAD_DELIMETERS: Array<string>; | ||
export const BAD_DELIMETERS: string[]; | ||
// The true delimiter. Invisible. ASCII code 30. Should be doing the job we strangely rely upon commas and tabs for. | ||
declare type RECORD_SEP_TYPE = ''; | ||
export type RECORD_SEP_TYPE = ''; | ||
export const RECORD_SEP = ''; | ||
// Also sometimes used as a delimiting character. ASCII code 31. | ||
declare type UNIT_SEP_TYPE = ''; | ||
export type UNIT_SEP_TYPE = ''; | ||
export const UNIT_SEP = ''; | ||
@@ -57,7 +57,7 @@ | ||
// When passed to Papa Parse a Readable stream is returned. | ||
declare type NODE_STREAM_INPUT_TYPE = 1; | ||
export type NODE_STREAM_INPUT_TYPE = 1; | ||
export const NODE_STREAM_INPUT = 1; | ||
// The possible values for the ParseConfig property delimitersToGuess | ||
declare type GuessableDelimiters = ',' | '\t' | '|' | ';' | RECORD_SEP_TYPE | UNIT_SEP_TYPE; | ||
export type GuessableDelimiters = ',' | '\t' | '|' | ';' | RECORD_SEP_TYPE | UNIT_SEP_TYPE; | ||
@@ -131,6 +131,12 @@ /** | ||
export interface UnparseConfig { | ||
quotes?: boolean | boolean[]; // default: false | ||
quotes?: boolean | boolean[] | ((value: any) => boolean); // default: false | ||
quoteChar?: string; // default: '"' | ||
escapeChar?: string; // default: '"' | ||
delimiter?: string; // default: "," | ||
/** | ||
* If defined and the download property is true, | ||
* a POST request will be made instead of a GET request and the passed argument will be set as the body of the request. | ||
* @default undefined | ||
*/ | ||
downloadRequestBody?: boolean; | ||
header?: boolean; // default: true | ||
@@ -143,4 +149,4 @@ newline?: string; // default: "\r\n" | ||
export interface UnparseObject { | ||
fields: Array<any>; | ||
data: string | Array<any>; | ||
fields: any[]; | ||
data: string | any[]; | ||
} | ||
@@ -159,3 +165,3 @@ | ||
aborted: boolean; // Whether process was aborted | ||
fields: Array<string>; // Array of field names | ||
fields: string[]; // Array of field names | ||
truncated: boolean; // Whether preview consumed all input | ||
@@ -166,12 +172,11 @@ cursor: number; | ||
/** | ||
* @interface ParseResult | ||
* | ||
* data: is an array of rows. If header is false, rows are arrays; otherwise they are objects of data keyed by the field name. | ||
* errors: is an array of errors | ||
* meta: contains extra information about the parse, such as delimiter used, the newline sequence, whether the process was aborted, etc. Properties in this object are not guaranteed to exist in all situations | ||
* meta: contains extra information about the parse, such as delimiter used, the newline sequence, whether the process was aborted, etc. | ||
* Properties in this object are not guaranteed to exist in all situations | ||
*/ | ||
export interface ParseResult<T> { | ||
data: Array<T>; | ||
errors: Array<ParseError>; | ||
data: T[]; | ||
errors: ParseError[]; | ||
meta: ParseMeta; | ||
} |
{ | ||
"name": "@types/papaparse", | ||
"version": "5.0.6", | ||
"version": "5.2.0", | ||
"description": "TypeScript definitions for PapaParse", | ||
@@ -51,2 +51,7 @@ "license": "MIT", | ||
"githubUsername": "rbarbazz" | ||
}, | ||
{ | ||
"name": "Piotr Błażejewicz", | ||
"url": "https://github.com/peterblazejewicz", | ||
"githubUsername": "peterblazejewicz" | ||
} | ||
@@ -65,4 +70,4 @@ ], | ||
}, | ||
"typesPublisherContentHash": "936e0706d214d98c1c2f50ad508fdff9f292c39deb0bad7554ed72ca1d8f6903", | ||
"typeScriptVersion": "3.0" | ||
"typesPublisherContentHash": "dd8f1a5e4b66435ac35454943e8aba54e3f34d6e7cf5c0602a66afa8e70ef9a8", | ||
"typeScriptVersion": "3.1" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Sun, 26 Jul 2020 13:36:40 GMT | ||
* Last updated: Wed, 26 Aug 2020 21:06:58 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
@@ -17,2 +17,2 @@ * Global values: `Papa` | ||
# Credits | ||
These definitions were written by [Pedro Flemming](https://github.com/torpedro), [Rain Shen](https://github.com/rainshen49), [João Loff](https://github.com/jfloff), [John Reilly](https://github.com/johnnyreilly), [Alberto Restifo](https://github.com/albertorestifo), [Behind The Math](https://github.com/BehindTheMath), [3af](https://github.com/3af), [Janne Liuhtonen](https://github.com/jliuhtonen), and [Raphaël Barbazza](https://github.com/rbarbazz). | ||
These definitions were written by [Pedro Flemming](https://github.com/torpedro), [Rain Shen](https://github.com/rainshen49), [João Loff](https://github.com/jfloff), [John Reilly](https://github.com/johnnyreilly), [Alberto Restifo](https://github.com/albertorestifo), [Behind The Math](https://github.com/BehindTheMath), [3af](https://github.com/3af), [Janne Liuhtonen](https://github.com/jliuhtonen), [Raphaël Barbazza](https://github.com/rbarbazz), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11019
148