@types/csv-stringify
Advanced tools
Comparing version 1.0.2 to 1.4.0
@@ -1,4 +0,5 @@ | ||
// Type definitions for csv-stringify 1.0 | ||
// Type definitions for csv-stringify 1.4 | ||
// Project: https://github.com/wdavidw/node-csv-stringify | ||
// Definitions by: Rogier Schouten <https://github.com/rogierschouten> | ||
// Arjen van der Ende <https://github.com/arjenvanderende> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -58,11 +59,20 @@ | ||
rowDelimiter?: string; | ||
/** | ||
* Override serialization of boolean, dates and complex objects. | ||
*/ | ||
formatters?: FormatterOpts; | ||
} | ||
interface FormatterOpts { | ||
bool?: (value: boolean) => string; | ||
date?: (value: Date) => string; | ||
object?: (value: any) => string; | ||
} | ||
interface Stringifier extends NodeJS.ReadWriteStream { | ||
// Stringifier stream takes array of strings or Object | ||
write(line: string[] | any): boolean; | ||
// Stringifier stream takes array of strings or Object, and optional encoding and callback | ||
write(line: string[] | any, encoding?: string, cb?: (error: Error | undefined, output: string) => void): boolean; | ||
// repeat declarations from NodeJS.WritableStream to avoid compile error | ||
write(buffer: string | Buffer, cb?: () => void): boolean; | ||
write(str: string, encoding?: string, cb?: () => void): boolean; | ||
write(buffer: string | Buffer, cb?: (error: Error | undefined, output: string) => void): boolean; | ||
} | ||
@@ -69,0 +79,0 @@ } |
{ | ||
"name": "@types/csv-stringify", | ||
"version": "1.0.2", | ||
"version": "1.4.0", | ||
"description": "TypeScript definitions for csv-stringify", | ||
@@ -10,2 +10,6 @@ "license": "MIT", | ||
"url": "https://github.com/rogierschouten" | ||
}, | ||
{ | ||
"name": "Arjen van der Ende", | ||
"url": "https://github.com/arjenvanderende" | ||
} | ||
@@ -23,4 +27,4 @@ ], | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "2427431d8657f0208f37a46e6a07e951af8b8dc6290911e5d378230a3595e5e8", | ||
"typesPublisherContentHash": "6198161c343007711efa03dcd8a6bcc0098b47f4fa67865d5b9f615e91787491", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Fri, 31 Mar 2017 18:05:13 GMT | ||
* Last updated: Wed, 12 Jul 2017 13:51:49 GMT | ||
* Dependencies: node | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Rogier Schouten <https://github.com/rogierschouten>. | ||
These definitions were written by Rogier Schouten <https://github.com/rogierschouten>, Arjen van der Ende <https://github.com/arjenvanderende>. |
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
6245
27651
4
83