mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-10 09:33:51 +00:00
8 lines
231 B
TypeScript
8 lines
231 B
TypeScript
import { Parser } from '@json2csv/plainjs';
|
|
|
|
const jsonParser = new Parser(); // This accepts options if needed
|
|
|
|
export const jsonToCsv = <T>(data: T[]): string => jsonParser.parse(data);
|
|
|
|
export type JsonToCsv = typeof jsonToCsv;
|