tiny-parse
Advanced tools
Comparing version 2.1.3 to 2.1.4
@@ -20,6 +20,8 @@ "use strict"; | ||
each(items, prop => { | ||
const aitem = prop.replace(/\+/g, " ").split("="), | ||
const aitem = prop.split("="), | ||
item = aitem.length > 2 ? [aitem.shift(), aitem.join("=")] : aitem; | ||
if (!isEmpty(item[0])) { | ||
item[0] = decodeURIComponent(item[0]); | ||
if (item[1] === undefined) { | ||
@@ -34,4 +36,3 @@ item[1] = ""; | ||
} else if (result[item[0]] instanceof Array === false) { | ||
result[item[0]] = [result[item[0]]]; | ||
result[item[0]].push(item[1]); | ||
result[item[0]] = [result[item[0]], item[1]]; | ||
} else { | ||
@@ -38,0 +39,0 @@ result[item[0]].push(item[1]); |
{ | ||
"name": "tiny-parse", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"description": "URL parsing with coercion of `query`", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4716