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 3.0.0 to 4.0.0

4

index.js

@@ -186,3 +186,3 @@ /**

this.forEach(function(item, name) {
items.push([name]);
items.push(name);
});

@@ -201,3 +201,3 @@ return makeIterator(items);

this.forEach(function(item) {
items.push([item]);
items.push(item);
});

@@ -204,0 +204,0 @@ return makeIterator(items);

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

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

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

#### Use with fetch ([#18](https://github.com/jerrybendy/url-search-params-polyfill/issues/18))
Via [fetch spec](https://fetch.spec.whatwg.org/#body-mixin), when passing a `URLSearchParams` object as a request body, the request should add a header with `Content-Type: application/x-www-form-urlencoded; charset=UTF-8`, but browsers which have `fetch` support ant not `URLSearchParams` support do not have this behavior.
Via [fetch spec](https://fetch.spec.whatwg.org/#body-mixin), when passing a `URLSearchParams` object as a request body, the request should add a header with `Content-Type: application/x-www-form-urlencoded; charset=UTF-8`, but browsers which have `fetch` support and not `URLSearchParams` support do not have this behavior.

@@ -147,0 +147,0 @@ Via the data of [caniuse](https://caniuse.com/#search=fetch), there are many browsers which support `fetch` but not `URLSearchParams`:

@@ -231,2 +231,4 @@ /**

expect(ret.join(';')).to.be.equal('a;b;c');
expect(Array.from(obj.keys())).to.be.eql(['a','b','c']);
});

@@ -241,2 +243,4 @@

expect(ret.join(';')).to.be.equal('1;2;3');
expect(Array.from(obj.values())).to.be.eql(['1', '2', '3']);
});

@@ -243,0 +247,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