Simple key / value pair query-string parser
JavaScript CSS Other
Latest commit 697838a Jul 17, 2015 @stephenmathieson stephenmathieson Merge pull request #12 from ubergrape/master
Add missing semicolon

Readme.md

querystring

Simple key / value pair query-string parser and formatter.

Installation

$ component install component/querystring

API

.parse(string)

Parse the given query string:

var query = require('querystring');
query.parse('name=tobi&species=ferret');
// => { name: 'tobi', species: 'ferret' }

.stringify(object)

Stringify the given object:

var query = require('querystring');
query.stringify({ name: 'tobi', species: 'ferret' });
// => "name=tobi&species=ferret"

License

MIT