parse-query

Parse browser query strings

npm install parse-query
10 downloads in the last week
20 downloads in the last month

parse-query

For da browsa.

Install

Node.js has built-in support query string parsing/stringifying. However, if you want to include the module in your app so you get dependency management with npm and then symlink the client side js file somewhere, you can install via npm:

npm install parse-query

Otherwise, for browsers, just grab either parse_query.js or parse_query.min.js in the root of this repo and place it in script tags on your page.

#parseQuery(string)

Attatched to window as parseQuery.

parseQuery '?hello=world'
# => { hello: 'world' }

If you don't pass it any options, it will default to window.location.search.

example

npm loves you