query-string-parse

1.1.1 • Public • Published

query-string-parse

a lightweight es6 utility for transforming query string parameters

Build Status Code Coverage version downloads MIT License

more documentation is coming soon 😀

Usage

import { parser } from "query-string-parse";
 
// to get query params from url use
// const input = window.location.search
 
const input = "?valueOne=one&valueTwo=two";
 
const queryStrings = parser(input);
 
// 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)

Package Sidebar

Install

npm i query-string-parse

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

12 kB

Total Files

10

Last publish

Collaborators

  • jackmoran1992