npm.io
0.2.0 • Published 10 years ago

friendly-querystring

Licence
ISC
Version
0.2.0
Deps
0
Vulns
0
Weekly
0
Stars
2

friendly-querystring

JSON.stringify <-> JSON.parse your objects in a friendly readable query string format

Build Status

{
  people: [{
    name: { first: 'Bob' },
    age: 34
  }, [null, { hi: undefined }]]
}

stringifys to and parses back to

"people.0.name.first=Bob&people.0.age=34&people.1.0&people.1.1.hi=undefined"
Features
  • Automatic coercion of core literals (true, false, numbers, empty object, empty array) from their string value
  • Arrays
  • Empty Arrays and Objects
  • Nested Objects, including arrays
Installation

via bower

bower install friendly-querystring

or via npm

npm install friendly-querystring

Keywords