search-to-obj
v1.0.8
Published
Helper module for converting location.search to an object
Downloads
20
Readme
search-to-obj
search-to-obj is a small module to quickly parse location.search, or the query string in an url to an object.
Installation
npm install search-to-obj
Usage
import searchToObj from 'search-to-obj';
or in node land
var searchToObj = require('search-to-obj');
and then just
const dls = document.location.search;
const searchParams = searchToObj(dls);
console.dir(searchParams);
Tests
npm test
Contributing
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.