Utility function for encoding and decoding simple objects to and from search parameters of Url object. Only objects with a depth of one are supported, which correspond to the following type:
export type QueryParams = { [k: string]: string | string[] };
Returns an object of type QueryParams populated with the values read from urlSearch.
Returns a urlSearch shaped string created from queryParams.
You can simply import it from github:
import { decodeQueryParams, encodeQueryParams } from "https://raw.githubusercontent.com/kerezsiz42/qs/master/index.ts"