w-querify
v1.2.1
Published
Stringify and parse query
Downloads
5
Readme
npm install --save w-queryfy
import { queryStringify, queryParse, constructUrl } from 'w-querify';
// foo=bar&bar=foo
const queryObj = queryStringify({
foo: 'bar',
bar: 'foo',
anyName: undefined,
});
// { foo: bar, bar: foo, name: false }
const parsedQuery = queryParse('foo=bar&bar=foo&name=false');
// some-url?foo=bar&bar=foo
constructUrl('some-url', { foo: 'bar', bar: 'foo' });