Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 6.0.0 to 7.0.0

23

index.js

@@ -276,6 +276,19 @@ /**

if (typeof search === "object") {
for (var key in search) {
if (search.hasOwnProperty(key)) {
appendTo(dict, key, search[key])
// if `search` is an array, treat it as a sequence
if (isArray(search)) {
for (var i = 0; i < search.length; i++) {
var item = search[i];
if (isArray(item) && item.length === 2) {
appendTo(dict, item[0], item[1]);
} else {
throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");
}
}
} else {
for (var key in search) {
if (search.hasOwnProperty(key)) {
appendTo(dict, key, search[key]);
}
}
}

@@ -320,2 +333,6 @@

function isArray(val) {
return !!val && '[object Array]' === Object.prototype.toString.call(val);
}
})(typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : this));

2

package.json
{
"name": "url-search-params-polyfill",
"version": "6.0.0",
"version": "7.0.0",
"description": "a simple polyfill for javascript URLSearchParams",

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

@@ -60,2 +60,5 @@ # URLSearchParams Polyfill [![](https://img.shields.io/npm/v/url-search-params-polyfill.svg)](https://www.npmjs.com/package/url-search-params-polyfill)

var search5 = new URLSearchParams(search2);
// from a sequence
var search6 = new URLSearchParams([["foo", 1], ["bar", 2]]);
```

@@ -62,0 +65,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