FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

node-querystring/Readme.md at master · ericchaves/node-querystring · GitHub

Latest commit

 

History

History
33 lines (19 loc) · 804 Bytes

File metadata and controls

33 lines (19 loc) · 804 Bytes

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, connect and others.

Installation

$ npm install qs

Examples

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

Back | FazBrowse Home | New Git URL