Socket
Socket
Sign inDemoInstall

whatwg-fetch

Package Overview
Dependencies
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whatwg-fetch - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

28

fetch.js

@@ -98,8 +98,4 @@ (function(self) {

value = normalizeValue(value)
var list = this.map[name]
if (!list) {
list = []
this.map[name] = list
}
list.push(value)
var oldValue = this.map[name]
this.map[name] = oldValue ? oldValue+','+value : value
}

@@ -112,10 +108,6 @@

Headers.prototype.get = function(name) {
var values = this.map[normalizeName(name)]
return values ? values[0] : null
name = normalizeName(name)
return this.has(name) ? this.map[name] : null
}
Headers.prototype.getAll = function(name) {
return this.map[normalizeName(name)] || []
}
Headers.prototype.has = function(name) {

@@ -126,11 +118,11 @@ return this.map.hasOwnProperty(normalizeName(name))

Headers.prototype.set = function(name, value) {
this.map[normalizeName(name)] = [normalizeValue(value)]
this.map[normalizeName(name)] = normalizeValue(value)
}
Headers.prototype.forEach = function(callback, thisArg) {
Object.getOwnPropertyNames(this.map).forEach(function(name) {
this.map[name].forEach(function(value) {
callback.call(thisArg, value, name, this)
}, this)
}, this)
for (var name in this.map) {
if (this.map.hasOwnProperty(name)) {
callback.call(thisArg, this.map[name], name, this)
}
}
}

@@ -137,0 +129,0 @@

{
"name": "whatwg-fetch",
"description": "A window.fetch polyfill.",
"version": "1.1.0",
"version": "2.0.0",
"main": "fetch.js",

@@ -6,0 +6,0 @@ "repository": "github/fetch",

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