Socket
Socket
Sign inDemoInstall

url-search-params-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

url-search-params-polyfill - npm Package Compare versions

Comparing version 8.1.0 to 8.1.1

22

index.js

@@ -139,2 +139,15 @@ /**

var useProxy = (!forSureUsePolyfill && nativeURLSearchParams && !isSupportObjectConstructor && self.Proxy);
var propValue;
if (useProxy) {
// Safari 10.0 doesn't support Proxy, so it won't extend URLSearchParams on safari 10.0
propValue = new Proxy(nativeURLSearchParams, {
construct: function (target, args) {
return new target((new URLSearchParamsPolyfill(args[0]).toString()));
}
})
// Chrome <=60 .toString() on a function proxy got error "Function.prototype.toString is not generic"
propValue.toString = Function.prototype.toString.bind(URLSearchParamsPolyfill);
} else {
propValue = URLSearchParamsPolyfill;
}
/*

@@ -144,10 +157,3 @@ * Apply polifill to global object and append other prototype into it

Object.defineProperty(self, 'URLSearchParams', {
value: (useProxy ?
// Safari 10.0 doesn't support Proxy, so it won't extend URLSearchParams on safari 10.0
new Proxy(nativeURLSearchParams, {
construct: function(target, args) {
return new target((new URLSearchParamsPolyfill(args[0]).toString()));
}
}) :
URLSearchParamsPolyfill)
value: propValue
});

@@ -154,0 +160,0 @@

{
"name": "url-search-params-polyfill",
"version": "8.1.0",
"version": "8.1.1",
"description": "a simple polyfill for javascript URLSearchParams",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/jerrybendy/url-search-params-polyfill",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc