https://github.com/tj/node-querystring
querystring parser for node and the browser - supporting nesting (used by Express, Connect, etc)
https://github.com/tj/node-querystring
Last synced: 9 months ago
JSON representation
querystring parser for node and the browser - supporting nesting (used by Express, Connect, etc)
- Host: GitHub
- URL: https://github.com/tj/node-querystring
- Owner: tj
- License: mit
- Created: 2011-02-04T03:47:02.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2014-08-04T22:48:41.000Z (over 11 years ago)
- Last Synced: 2024-04-13T20:53:10.413Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1 MB
- Stars: 455
- Watchers: 20
- Forks: 66
- Open Issues: 34
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
README
# THIS REPOSITORY IS NOW DEPRECATED
`qs@1.0.0+` is now maintained by the awesome [hapijs team](https://github.com/hapijs) at [hapijs/qs](https://github.com/hapijs/qs).
Please direct any new issues and concerns in that repository!
# node-querystring [](https://travis-ci.org/visionmedia/node-querystring)
query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.
## Installation
$ npm install qs
## Examples
```js
var qs = require('qs');
qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');
// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }
qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})
// => user[name]=Tobi&user[email]=tobi%40learnboost.com
```
## Testing
Install dev dependencies:
$ npm install -d
and execute:
$ make test
browser:
$ open test/browser/index.html