/** * CSV parsing and serialization utilities for Elo. * * CSV data is represented as an array of objects, where: * - Headers become object keys * - All values are kept as strings (Elo's type coercion handles conversion) */ /** * Parse a CSV string into an array of objects. * First row is treated as headers (keys for each row object). * All values are kept as strings. * * @param csv - The CSV string to parse * @returns An array of objects, one per data row * * @example * parseCSV('name,age\nAlice,30\nBob,25') * // => [{name: 'Alice', age: '30'}, {name: 'Bob', age: '25'}] */ export declare function parseCSV(csv: string): Record[]; /** * Serialize a value to CSV format. * * For arrays of objects, the first object's keys become headers. * For a single object, it becomes a single-row CSV with headers. * For other values, an error is thrown. * * @param value - The value to serialize (array of objects, or single object) * @returns A CSV string * * @example * toCSV([{name: 'Alice', age: 30}, {name: 'Bob', age: 25}]) * // => 'name,age\nAlice,30\nBob,25' * * toCSV({name: 'Alice', age: 30}) * // => 'name,age\nAlice,30' */ export declare function toCSV(value: unknown): string; //# sourceMappingURL=csv.d.ts.map