mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-14 11:33:51 +00:00
Move more components to shlink-web-component when applicable
This commit is contained in:
7
shlink-web-component/utils/helpers/json.ts
Normal file
7
shlink-web-component/utils/helpers/json.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user