queryjs

0.0.1 • Public • Published

queryjs

easy url query parameter manipulation

available in the browser and in nodejs npm install 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)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    288
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    288
  • 0.0.0
    0

Package Sidebar

Install

npm i queryjs

Weekly Downloads

288

Version

0.0.1

License

MIT

Last publish

Collaborators

  • dubfriend