qs-extra
v0.0.1
Published
extended querystring module supporting add/remove parameters
Downloads
8
Readme
qs-extra
The extended node.js querystring APIs supporting add/remove parameters.
Installation
$ npm install qs-extra
API
.add(str, key, val)
Add key/val pair to query string.
var qs = require('qs-extra');
qs.add('color=red', 'size', 'small');
// => 'color=red&size=small'
.remove(str, key, val)
Remove key's val from query string.
var qs = require('qs-extra');
qs.remove('color=red&size=small&size=large', 'size', 'large');
// => 'color=red&size=small'
General querystring APIs are also available through this module.
Testing
Install dev dependencies:
$ npm install -d
and execute:
$ make test