Merge pull request #26580 from albertorestifo/papaparse-node-stream

papaparse: Add NODE_STREAM_INPUT support
This commit is contained in:
Nathan Shively-Sanders
2018-06-21 09:11:25 -07:00
committed by GitHub
2 changed files with 10 additions and 1 deletions
+7 -1
View File
@@ -1,9 +1,10 @@
// Type definitions for PapaParse v4.1
// Type definitions for PapaParse v4.5
// Project: https://github.com/mholt/PapaParse
// Definitions 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>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -18,6 +19,8 @@ export function parse(file: File, config?: ParseConfig): ParseResult;
export function parse(stream: ReadableStream, config?: ParseConfig): ParseResult;
export function parse(stream: typeof NODE_STREAM_INPUT, config?: ParseConfig): ReadableStream;
/**
* Unparses javascript data objects and returns a csv string
*/
@@ -45,6 +48,9 @@ export const WORKERS_SUPPORTED: boolean;
// The relative path to Papa Parse. This is automatically detected when Papa Parse is loaded synchronously.
export const SCRIPT_PATH: string;
// When passed to Papa Parse a Readable stream is returned.
export const NODE_STREAM_INPUT = 1;
/**
* Configurable Properties
*/
+3
View File
@@ -36,6 +36,9 @@ Papa.parse(file, {
}
});
Papa.parse(Papa.NODE_STREAM_INPUT);
/**
* Unparsing
*/