url-search-params-update
v1.5.0
Published
set, get and delete search params from url
Downloads
1
Readme
URL Search Params Update
set, get and delete search params from url
Install
npm install --save url-search-params-update
Usage
import params from 'url-search-params-update'
console.log(location.search)
//=> '?foo=bar&x=y'
const foo = params.get("foo")
//=> 'bar'
params.set("foo", "sindresorhus")
//=> '?foo=sindresorhus&x=y'
params.delete("x")
//=> '?foo=sindresorhus'
License
MIT © [Kiran P S]