get-url-generator
v0.0.2
Published
Objects -> GET parameters
Downloads
9
Maintainers
Readme
get-url-generator
Install
$ npm install --save get-url-generator
Usage
const generateUrl = require('get-url-generator');
generateUrl('http://google.com', {
q: 'generate url',
true: 'true',
test: 'ava'
});
//=> http://google.com?q=generate+url&true=true&test=ava
generateUrl('google.com/search', { q: 'test' });
//=> google.com/search?q=test
generateUrl('http://google.com');
//=> http://google.com