A JavaScript library for getting and setting query parameters.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
LICENSE
README.md
bower.json
qurl.js

README.md

Qurl

Qurl is a browser JavaScript library for getting and setting query parameters. This library makes use of Window Location and pushState to operate.

Usage

Create a new Qurl object.

var url = Qurl.create();

There is only one method, query which performs the available tasks.

Get the query parameters as an object.

obj = url.query();

Get the value of a single query parameter by passing its key as an argument.

key = url.query('key');

Set the value for a query parameter.

url.query('key','value');

Delete a query parameter by passing false as the second argument after the key.

url.query('key',false);

Version History

  • v0.1.2 - 2014-03-19

    • Only use pushState when supported
  • v0.1.1 - 2014-02-08

    • Fixed a bug where the last query parameter could not be removed
  • v0.1.0 - 2014-02-07

    • Initial