Get the all query params of the current Web URL(location.search).
location.search
Usage:
import { getAllQueryParams } from "mazey";// http://example.com/?t1=1&t2=2&t3=3&t4=4#2333// ?t1=1&t2=2&t3=3&t4=4const ret = getAllQueryParams();console.log(ret); Copy
import { getAllQueryParams } from "mazey";// http://example.com/?t1=1&t2=2&t3=3&t4=4#2333// ?t1=1&t2=2&t3=3&t4=4const ret = getAllQueryParams();console.log(ret);
Output:
{ t1: "1", t2: "2", t3: "3", t4: "4" } Copy
{ t1: "1", t2: "2", t3: "3", t4: "4" }
Optional, The URL string.
The query params object.
Get the all query params of the current Web URL(
location.search).Usage:
Output: