url-query

2.0.0 • Public • Published

url-query

parses and returns a window.location.search like string as object. this is a tiny and simple function without fancy stuff like nested objects.

install

npm install url-query

usage

var query = require('url-query');
 
query() // -> parses the `window.location.search` string if present
query('?a=b') // -> {a:'b'}
query('?suuper=star&caret=rocks') // -> {caret:'rocks', suuper:'star'}

test

npm test

license

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    3
  • 1.0.3
    0
  • 1.0.2
    0
  • 1.0.1
    0

Package Sidebar

Install

npm i url-query

Weekly Downloads

3

Version

2.0.0

License

MIT

Last publish

Collaborators

  • andineck