shlink-web-client/shlink-web-component/utils/helpers/query.ts
2023-08-03 09:13:10 +02:00

5 lines
239 B
TypeScript

import qs from 'qs';
export const parseQuery = <T>(search: string) => qs.parse(search, { ignoreQueryPrefix: true }) as unknown as T;
export const stringifyQuery = (query: any): string => qs.stringify(query, { arrayFormat: 'brackets' });