npm.io
1.2.0 • Published 9 years ago

workplus-query-string

Licence
MIT
Version
1.2.0
Deps
0
Vulns
0
Weekly
0
Stars
1

workplus-query-string npm

Parse and stringify URL

Install

npm install --save workplus-query-string

Usage

import { parse, stringify, getParam } from 'workplus-query-string';

// If location.search = '?a=1&b=2&c=3'

let params = parse();
// params => {a: "1", b: "2", c: "3"}

let obj = {
    x: 1,
    y: 2,
},

let str = stringify(obj);
// str => 'x=1&y=2'

let val = getParam('a');
// val => '1'

License

MIT

Keywords