Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Parse query strings in the browser
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
src
test
.gitignore
Makefile
README.md
license.txt
package.json
parse_query.js
parse_query.min.js

README.md

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

Something went wrong with that request. Please try again.