queryString.ts 207 B

12345678910
  1. export const queryString = (params: any) => {
  2. return Object.keys(params)
  3. .filter((k) => {
  4. return !!params[k];
  5. })
  6. .map((k) => {
  7. return k + '=' + params[k];
  8. })
  9. .join('&');
  10. };