Parses a query string into an object of key value pairs. Reoccurring keys are converted into key-array pairs. No transformation of the individual values is done, i.e. all values will be strings.
The query string. May start with an optional "?"
the parsed object
import { queryToObject } from "apprt-core/url-utils";const object = queryToObject("a=1&b=2&b=3");// object is { a: "1", b: ["2", "3"] } Copy
import { queryToObject } from "apprt-core/url-utils";const object = queryToObject("a=1&b=2&b=3");// object is { a: "1", b: ["2", "3"] }
Parses a query string into an object of key value pairs. Reoccurring keys are converted into key-array pairs. No transformation of the individual values is done, i.e. all values will be strings.