Skip to content

DubFriend/queryjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

easy url query parameter manipulation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published