https://github.com/component/querystring
Simple key / value pair query-string parser
https://github.com/component/querystring
Last synced: 7 months ago
JSON representation
Simple key / value pair query-string parser
- Host: GitHub
- URL: https://github.com/component/querystring
- Owner: component
- Created: 2012-08-29T02:25:47.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2022-01-15T01:20:22.000Z (about 4 years ago)
- Last Synced: 2025-08-15T03:45:25.984Z (8 months ago)
- Language: JavaScript
- Size: 52.7 KB
- Stars: 34
- Watchers: 4
- Forks: 18
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# querystring
Simple key / value pair query-string parser and formatter.
## Installation
```
$ component install component/querystring
```
## API
### .parse(string)
Parse the given query `string`:
```js
var query = require('querystring');
query.parse('name=tobi&species=ferret');
// => { name: 'tobi', species: 'ferret' }
```
### .stringify(object)
Stringify the given `object`:
```js
var query = require('querystring');
query.stringify({ name: 'tobi', species: 'ferret' });
// => "name=tobi&species=ferret"
```
## License
MIT