query-string-parse
a lightweight es6 utility for transforming query string parameters
more documentation is coming soon 😀
Usage
; // to get query params from url use// const input = window.location.search const input = "?valueOne=one&valueTwo=two"; const queryStrings = ; // will return// { valueOne: "one", valueTwo: "two" }
Please feel free to raise issues and remember to star this repo!
Thanks!
Current functionality
- handles query string with leading '?'
- handles query string without leading '?'
- ensures input is valid (type === string)