object-to-query
v1.0.1
Published
an small library to convert js objects to querystrings
Readme
object-to-query 
an small library to convert js objects to querystrings
Usage
Install with npm
npm install object-to-query --saveStart using is as simple as:
const transform = require('object-to-query') const result = transform({ id: 1, name: 'Eduardo' }); console.log(result); // output &id=1&name=EduardoYou can exclude the properties you want
const transform = require('object-to-query') const result = transform({ id: 1, name: 'Eduardo', notThisOne: 'i am a bad property', age: 30 }, ['notThisOne']); console.log(result); // output &id=1&name=Eduardo&age=30I want the question mark as the first symbol in my string!!11UNO
const transform = require('object-to-query') const result = transform({ id: 1, name: 'Eduardo' }, [], true); console.log(result); // output ?id=1&name=Eduardo
Development
Install dependencies
npm installWrite your code! Yep that's it!
Testing
We are using tape because is small and awesome, only run the default test command
npm testIf everything looks green you are fine.
