mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-26 02:48:22 +03:00
7 lines
231 B
TypeScript
7 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;
|