query-extend
Like _.extend, just for URL queries.
Usage
var queryExtend = ; ;// => http://foo.com?per_page=20&page=1 ;// => http://foo.com?per_page=20&page=1 ;// => http://foo.com?per_page=20&tags[]=shoes&tags[]=shirts ;// => http://foo.com?per_page=50 ;// => http://foo.com?per_page=20 // Passing in 'true' as last parameter makes// queryExtend return the result as Object;// => { per_page: '50' } // ... I think you get it.. :)
Installation
npm
npm install query-extend
bower
bower install query-extend
Contribution
-
Setup: Run
npm install
. -
Testing: Run
npm test
to see if the tests pass. -
Minify: Run
gulp
.
License
Copyright (c) 2014 Simon Kusterer Licensed under the MIT license.