easy url query parameter manipulation
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE.markdown
README.markdown
bower.json
gruntfile.js
package.json
query.js
test.js

README.markdown

queryjs

easy url query parameter manipulation

available in the browser and in nodejs

  • npm install queryjs
  • bower install dubfriend-queryjs

##queryjs.set(parameterObject)

//newURL === 'url.com?a=foo';
var newURL = queryjs.set('url.com', { a: 'foo' });

//newURL === 'url.com?a=new&b=bar'
newURL = queryjs.set('url.com?a=foo', { a: 'new', b: 'bar' });

##queryjs.get()

//parameters === { a: 'foo' };
var parameters = queryjs.get('url.com?a=foo');

works with url hashes. (todo: support query parameter arrays)