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 5.0.0 to 5.0.1

.DS_Store

21

index.js

@@ -12,3 +12,3 @@ /**

var nativeURLSearchParams = self.URLSearchParams ? self.URLSearchParams : null,
var nativeURLSearchParams = (self.URLSearchParams && self.URLSearchParams.prototype.get) ? self.URLSearchParams : null,
isSupportObjectConstructor = nativeURLSearchParams && (new nativeURLSearchParams({a: 1})).toString() === 'a=1',

@@ -135,12 +135,13 @@ // There is a bug in safari 10.1 (and earlier) that incorrectly decodes `%2B` as an empty space and not a plus.

*/
self.URLSearchParams = 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;
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)
});
var USPProto = self.URLSearchParams.prototype;

@@ -147,0 +148,0 @@

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

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

# URLSearchParams Polyfill [![](https://img.shields.io/npm/v/url-search-params-polyfill.svg)](https://www.npmjs.com/package/url-search-params-polyfill)
This is a polyfill library for JavaScript's URLSearchParams class. This library has implemented all features from [MDN document](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams).
This is a polyfill library for JavaScript's `URLSearchParams` class.
This library can use for both browsers and Node.js.
### Features
Some browsers have native URLSearchParams class support, but not full. The new `2.x` version detects if browsers have full feature support and extends it.
* Implemented all features from [MDN document](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams).
* Can use for both browsers and Node.js.
* Detect if browsers have full support for `URLSearchParams` and extend it
## Installation

@@ -10,0 +13,0 @@

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