@naturalcycles/nodejs-lib
Version:
Standard library for Node.js
17 lines (16 loc) • 549 B
TypeScript
import { Options } from 'csv-stringify';
import { TransformTyped } from '../stream.model';
/**
* https://csv.js.org/stringify/options/
*/
export interface TransformToCSVOptions extends Options {
/**
* @default true
* If true - will throw an error on JSON.parse / stringify error
*/
strict?: boolean;
}
/**
* Transforms objects (objectMode=true) into chunks \n-terminated JSON strings (readableObjectMode=false).
*/
export declare function transformToCSV<IN = any>(opt?: TransformToCSVOptions): TransformTyped<IN, string>;