query-string-flatten
v1.0.0
Published
Create a query string with flattened object syntax
Downloads
28
Maintainers
Readme
query-string-flatten
Create a query string with flattened object syntax
Install
$ npm install --save query-string-flatten
Usage
var query = require('query-string-flatten')
query({foo: {bar: 1}})
//=> foo%5Bbar%5D%3D1
API
query(obj)
-> string
Returns a URL-encoded query string
obj
Required
Type: object
An object containing key/value pairs for the query string. This object can have nested objects up to 1 level deep.
License
MIT © Ben Drucker