url-search-params-polyfill
Advanced tools
Comparing version 3.0.0 to 4.0.0
@@ -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 @@ |
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
26096
640