@types/csv-parse
Advanced tools
@@ -1,2 +0,2 @@ | ||
// Type definitions for csv-parse 1.1.0 | ||
// Type definitions for csv-parse 1.1 | ||
// Project: https://github.com/wdavidw/node-csv-parse | ||
@@ -8,88 +8,106 @@ // Definitions by: David Muller <https://github.com/davidm77> | ||
declare module "csv-parse/types" { | ||
interface callbackFn { | ||
(err: any, output: any): void | ||
} | ||
import * as stream from "stream"; | ||
interface nameCallback { | ||
(line1: any[]): boolean | string[] | ||
export = parse; | ||
declare function parse(input: string, options?: parse.Options, callback?: parse.Callback): any; | ||
declare function parse(options?: parse.Options, callback?: parse.Callback): any; | ||
declare function parse(callback?: parse.Callback): any; | ||
declare namespace parse { | ||
type Callback = (err: any, output: any) => void; | ||
interface Parser extends stream.Transform {} | ||
class Parser { | ||
constructor(options: Options); | ||
__push(line: any): any ; | ||
__write(chars: any, end: any, callback: any): any; | ||
} | ||
interface options { | ||
/*** | ||
* Set the field delimiter. One character only, defaults to comma. | ||
interface Options { | ||
/** | ||
* Set the field delimiter. One character only, defaults to comma. | ||
*/ | ||
delimiter?: string; | ||
/*** | ||
* String used to delimit record rows or a special value; special constants are 'auto', 'unix', 'mac', 'windows', 'unicode'; defaults to 'auto' (discovered in source or 'unix' if no source is specified). | ||
/** | ||
* String used to delimit record rows or a special value; | ||
* special constants are 'auto', 'unix', 'mac', 'windows', 'unicode'; | ||
* defaults to 'auto' (discovered in source or 'unix' if no source is specified). | ||
*/ | ||
rowDelimiter?: string; | ||
/*** | ||
* Optional character surrounding a field, one character only, defaults to double quotes. | ||
/** | ||
* Optional character surrounding a field, one character only, defaults to double quotes. | ||
*/ | ||
quote?: string | ||
/*** | ||
* Set the escape character, one character only, defaults to double quotes. | ||
/** | ||
* Set the escape character, one character only, defaults to double quotes. | ||
*/ | ||
escape?: string | ||
/*** | ||
* List of fields as an array, a user defined callback accepting the first line and returning the column names or true if autodiscovered in the first CSV line, default to null, affect the result data set in the sense that records will be objects instead of arrays. | ||
/** | ||
* List of fields as an array, | ||
* a user defined callback accepting the first line and returning the column names or true if autodiscovered in the first CSV line, | ||
* default to null, | ||
* affect the result data set in the sense that records will be objects instead of arrays. | ||
*/ | ||
columns?: any[]|boolean|nameCallback; | ||
columns?: any[] | boolean | ((line1: any[]) => boolean | string[]); | ||
/*** | ||
* Treat all the characters after this one as a comment, default to '' (disabled). | ||
/** | ||
* Treat all the characters after this one as a comment, default to '' (disabled). | ||
*/ | ||
comment?: string | ||
/*** | ||
* Name of header-record title to name objects by. | ||
/** | ||
* Name of header-record title to name objects by. | ||
*/ | ||
objname?: string | ||
/*** | ||
* Preserve quotes inside unquoted field. | ||
/** | ||
* Preserve quotes inside unquoted field. | ||
*/ | ||
relax?: boolean | ||
/*** | ||
* Discard inconsistent columns count, default to false. | ||
/** | ||
* Discard inconsistent columns count, default to false. | ||
*/ | ||
relax_column_count?: boolean | ||
/*** | ||
* Dont generate empty values for empty lines. | ||
/** | ||
* Dont generate empty values for empty lines. | ||
*/ | ||
skip_empty_lines?: boolean | ||
/*** | ||
* Maximum numer of characters to be contained in the field and line buffers before an exception is raised, used to guard against a wrong delimiter or rowDelimiter, default to 128000 characters. | ||
/** | ||
* Maximum numer of characters to be contained in the field and line buffers before an exception is raised, | ||
* used to guard against a wrong delimiter or rowDelimiter, | ||
* default to 128000 characters. | ||
*/ | ||
max_limit_on_data_read?: number | ||
/*** | ||
* If true, ignore whitespace immediately around the delimiter, defaults to false. Does not remove whitespace in a quoted field. | ||
/** | ||
* If true, ignore whitespace immediately around the delimiter, defaults to false. | ||
* Does not remove whitespace in a quoted field. | ||
*/ | ||
trim?: boolean | ||
/*** | ||
* If true, ignore whitespace immediately following the delimiter (i.e. left-trim all fields), defaults to false. Does not remove whitespace in a quoted field. | ||
/** | ||
* If true, ignore whitespace immediately following the delimiter (i.e. left-trim all fields), defaults to false. | ||
* Does not remove whitespace in a quoted field. | ||
*/ | ||
ltrim?: boolean | ||
/*** | ||
* If true, ignore whitespace immediately preceding the delimiter (i.e. right-trim all fields), defaults to false. Does not remove whitespace in a quoted field. | ||
/** | ||
* If true, ignore whitespace immediately preceding the delimiter (i.e. right-trim all fields), defaults to false. | ||
* Does not remove whitespace in a quoted field. | ||
*/ | ||
rtrim?: boolean | ||
/*** | ||
* If true, the parser will attempt to convert read data types to native types. | ||
/** | ||
* If true, the parser will attempt to convert read data types to native types. | ||
*/ | ||
auto_parse?: boolean | ||
/*** | ||
* If true, the parser will attempt to convert read data types to dates. It requires the "auto_parse" option. | ||
/** | ||
* If true, the parser will attempt to convert read data types to dates. It requires the "auto_parse" option. | ||
*/ | ||
@@ -99,40 +117,6 @@ auto_parse_date?: boolean | ||
import * as stream from "stream"; | ||
interface Parser extends stream.Transform { | ||
__push(line: any): any ; | ||
__write(chars: any, end: any, callback: any): any; | ||
} | ||
interface ParserConstructor { | ||
new (options: options): Parser; | ||
} | ||
// TODO: what is this for? | ||
interface ParserStream extends NodeJS.ReadWriteStream { | ||
read(size?: number): any & string[]; | ||
} | ||
interface parse { | ||
(input: string, options?: options, callback?: callbackFn): any; | ||
(options: options, callback: callbackFn): any; | ||
(callback: callbackFn): any; | ||
(options?: options): ParserStream; | ||
Parser: ParserConstructor; | ||
} | ||
} | ||
declare module "csv-parse" { | ||
import { parse as parseIntf } from "csv-parse/types"; | ||
let parse: parseIntf; | ||
export = parse; | ||
} | ||
declare module "csv-parse/lib/sync" { | ||
import { options } from "csv-parse/types"; | ||
function parse (input: string, options?: options): any; | ||
export = parse; | ||
} |
{ | ||
"name": "@types/csv-parse", | ||
"version": "1.1.6", | ||
"description": "TypeScript definitions for csv-parse 1.1.0", | ||
"version": "1.1.7", | ||
"description": "TypeScript definitions for csv-parse", | ||
"license": "MIT", | ||
"author": "David Muller <https://github.com/davidm77>", | ||
"contributors": [ | ||
{ | ||
"name": "David Muller", | ||
"url": "https://github.com/davidm77" | ||
} | ||
], | ||
"main": "", | ||
@@ -17,4 +22,4 @@ "repository": { | ||
"peerDependencies": {}, | ||
"typings": "index.d.ts", | ||
"typesPublisherContentHash": "1dcbca2cb27b1370ee85483bc8577b3f3b3617a72bf941568c4b8360cd2051b9" | ||
"typesPublisherContentHash": "bc811d81f8f107482b415cdd91b831d464001a9cba6acf06cbdca40539f99267", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -5,12 +5,10 @@ # Installation | ||
# Summary | ||
This package contains type definitions for csv-parse 1.1.0 (https://github.com/wdavidw/node-csv-parse). | ||
This package contains type definitions for csv-parse (https://github.com/wdavidw/node-csv-parse). | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/csv-parse | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/csv-parse | ||
Additional Details | ||
* Last updated: Mon, 21 Nov 2016 21:02:55 GMT | ||
* File structure: ModuleAugmentation | ||
* Library Dependencies: node | ||
* Module Dependencies: csv-parse/types, stream | ||
* Last updated: Sat, 11 Mar 2017 01:36:05 GMT | ||
* Dependencies: stream, node | ||
* Global values: none | ||
@@ -17,0 +15,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
-100%5350
-17.13%102
-24.44%17
-10.53%