mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-26 19:08:23 +03: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;
|