Archived
2
This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.

7 lines
210 B
TypeScript
Raw Normal View History

2020-06-29 12:27:39 +02:00
import {parseAsync} from 'json2csv';
export default function csv(input: object, fields: string[], f: (err, data) => void) {
parseAsync(input)
.then(csv => f(null, csv))
.catch(err => f(err, null));
}