seturlparameter
Advanced tools
Comparing version 1.0.2 to 1.1.0
{ | ||
"name": "seturlparameter", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "set an url parameter", | ||
"main": "setUrlParameter.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"test": "ava", | ||
"build": "google-closure-compiler --js=setUrlParameter.js --js_output_file=setUrlParameter.min.js" | ||
@@ -13,2 +13,3 @@ }, | ||
"devDependencies": { | ||
"ava": "^1.2.0", | ||
"google-closure-compiler": "^20190121.0.0" | ||
@@ -15,0 +16,0 @@ }, |
@@ -18,2 +18,5 @@ const setParam = (urlQueryString, newParam, encodedValue, encodedKey) => { | ||
const setUrlParameter = (url, key, value) => { | ||
if (!url || !key || !value) { | ||
return undefined; | ||
} | ||
const encodedKey = encodeURIComponent(key); | ||
@@ -20,0 +23,0 @@ const encodedValue = encodeURIComponent(value); |
Sorry, the diff of this file is not supported yet
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
108317
7
75
0
2