query-stringifier
v1.2.0
Published
A small library for build query strings
Downloads
1
Maintainers
Readme
Query-Stringifier
A small library for build query strings
Install
npm install query-stringifier
Usage
const qs = require('query-stringifier');
const params = {
food: pizza,
bar: chocolate
}
qs.stringify(params);
// 'food=pizza&bar=chocolate'
// Also add options!
const options = { prefix: '?' };
qs.stringify(params, options);
// '?food=pizza&bar=chocolate'
// Parse query strings into objects
qs.parse('?food=pizza&bar=chocolate');
// { food: pizza, bar: chocolate }
Issues?
Go here