get-url-query
v2.0.17
Published
easily convert query to json
Downloads
20
Readme
get-url-query
get-url-query
is a package for easily convert query to json.
npm i get-url-query
# or
yarn add get-url-query
import getUrlQuery from "get-url-query";
// get query from `location.search`
getUrlQuery();
// get query from `string`
getUrlQuery("http://example.com/?hello=world&hi=joenix");
// expand location
location.query; // { hello: 'world', hi: 'joenix' }