https://github.com/kiranps/url-search-params-update
set, get and delete search params from url
https://github.com/kiranps/url-search-params-update
javascript update-url-search-parms url url-parser url-search-parms
Last synced: about 1 month ago
JSON representation
set, get and delete search params from url
- Host: GitHub
- URL: https://github.com/kiranps/url-search-params-update
- Owner: kiranps
- Created: 2017-11-21T17:49:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-21T18:01:53.000Z (over 8 years ago)
- Last Synced: 2025-07-07T00:02:58.993Z (12 months ago)
- Topics: javascript, update-url-search-parms, url, url-parser, url-search-parms
- Language: JavaScript
- Size: 81.1 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# URL Search Params Update
> set, get and delete search params from url
## Install
```sh
npm install --save url-search-params-update
```
## Usage
```js
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]