UNPKG

csv-export-import

Version:

This package will help converting data objects to csv and vice versa.

25 lines (20 loc) 968 B
interface IConfigProperty { header: string; property?: string; isArray?: boolean; spread?: boolean; order: number; generateExportDataFn?: (propertyData: any, item: any, index: number, dependentData: any) => any; } interface IExportConfiguration { title: string; includeHeader: boolean; columnSeparator: string; arraySeparator: string; sorroundValuesByString: string; removePipedArrayHeaderBrackets: boolean; } declare const simpleExportToCSV: (items: any[], spreadArrays?: boolean, columnSeparator?: string, arraySeparator?: string) => string; declare const exportToCSV: (items: any, configProperties: IConfigProperty[], exportConfig?: IExportConfiguration, dependentData?: any) => string; declare const importFromCSV: (csv: string, hasHeader?: boolean, hasTitle?: boolean, includeLineInfo?: boolean) => any; export { type IConfigProperty, type IExportConfiguration, exportToCSV, importFromCSV, simpleExportToCSV };