qs2
Fork of qs that does not include array indexes when seralizing arrays.
var params = a: 1 2 3 qs// => a[0]=1&a[1]=2&a[2]=3 qs2// => a[]=1&a[]=2&a[]=3
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 = ; qs;// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } qs// => 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