UNPKG

tsbase

Version:

Base class libraries for TypeScript

17 lines (16 loc) 557 B
export declare class Csv { private constructor(); /** * Accepts a json object and returns the CSV string equivalent. * @param json */ static EncodeAsCsv(headers: Array<string>, json: object): string; /** * Accepts a csv string amd returns the JSON equivalent object. * @param csv * @param headerKeys sequential array of keys for each header in the given csv * @returns */ static DecodeAsJson<T extends object>(csv: string, headerKeys: Array<string | null>): T[]; private static convertToCSV; }