add-query-params-to-url
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "add-query-params-to-url", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "lightweight utility for adding formatted query parameters to get request url.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,3 +25,15 @@ # add-query-params-to-url | ||
// url argument is optional, it just prepends the formatted parameters to the end of the url. | ||
fetch(`${url}${addParams({ | ||
auth: 'bearer', | ||
token: '12345', | ||
username: 'ynautwobbuffet', | ||
password: '42069' | ||
})}`, { | ||
method: 'GET' | ||
}) | ||
``` | ||
2516
39