url-search-params-polyfill
Advanced tools
Comparing version 7.0.1 to 8.0.0
15
index.js
@@ -76,3 +76,3 @@ /** | ||
var dict = this [__URLSearchParams__]; | ||
return name in dict ? dict[name][0] : null; | ||
return this.has(name) ? dict[name][0] : null; | ||
}; | ||
@@ -88,3 +88,3 @@ | ||
var dict = this [__URLSearchParams__]; | ||
return name in dict ? dict [name].slice(0) : []; | ||
return this.has(name) ? dict [name].slice(0) : []; | ||
}; | ||
@@ -99,3 +99,3 @@ | ||
prototype.has = function(name) { | ||
return name in this [__URLSearchParams__]; | ||
return hasOwnProperty(this [__URLSearchParams__], name); | ||
}; | ||
@@ -326,5 +326,6 @@ | ||
value !== null && value !== undefined && typeof value.toString === 'function' ? value.toString() : JSON.stringify(value) | ||
) | ||
); | ||
if (name in dict) { | ||
// #47 Prevent using `hasOwnProperty` as a property name | ||
if (hasOwnProperty(dict, name)) { | ||
dict[name].push(val); | ||
@@ -340,2 +341,6 @@ } else { | ||
function hasOwnProperty(obj, prop) { | ||
return Object.prototype.hasOwnProperty.call(obj, prop); | ||
} | ||
})(typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : this)); |
{ | ||
"name": "url-search-params-polyfill", | ||
"version": "7.0.1", | ||
"version": "8.0.0", | ||
"description": "a simple polyfill for javascript URLSearchParams", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/jerrybendy/url-search-params-polyfill", |
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
15714
297