@naturalcycles/nodejs-lib
Version:
Standard library for Node.js
17 lines (16 loc) • 484 B
TypeScript
import type { AnyObject } from '@naturalcycles/js-lib/types';
export interface CSVReaderConfig {
/**
* Default: comma
*/
/**
* Default: true
*/
firstRowIsHeader?: boolean;
/**
* Array of columns, to be used if there is no header row.
*/
columns?: string[];
}
export declare function csvStringParse<T extends AnyObject = any>(str: string, cfg?: CSVReaderConfig): T[];
export declare function csvStringToArray(str: string): string[][];