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

@whatwg-node/node-fetch

Package Overview
Dependencies
Maintainers
1
Versions
509
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@whatwg-node/node-fetch - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6-alpha-20230207082303-4613c8e

28

index.js

@@ -716,2 +716,5 @@ 'use strict';

function isHeadersLike(headers) {
return headers && typeof headers.get === 'function';
}
class PonyfillHeaders {

@@ -722,16 +725,7 @@ constructor(headersInit) {

if (Array.isArray(headersInit)) {
for (const [key, value] of headersInit) {
if (Array.isArray(value)) {
for (const v of value) {
this.append(key, v);
}
}
else {
this.map.set(key, value);
}
}
this.map = new Map(headersInit);
}
else if ('get' in headersInit) {
else if (isHeadersLike(headersInit)) {
headersInit.forEach((value, key) => {
this.append(key, value);
this.map.set(key, value);
});

@@ -742,10 +736,6 @@ }

const value = headersInit[key];
if (Array.isArray(value)) {
for (const v of value) {
this.append(key, v);
}
if (value != null) {
const normalizedValue = Array.isArray(value) ? value.join(', ') : value;
this.map.set(key, normalizedValue);
}
else if (value != null) {
this.set(key, value);
}
}

@@ -752,0 +742,0 @@ }

{
"name": "@whatwg-node/node-fetch",
"version": "0.0.5",
"version": "0.0.6-alpha-20230207082303-4613c8e",
"description": "Fetch API implementation for Node",

@@ -5,0 +5,0 @@ "sideEffects": false,

Sorry, the diff of this file is not supported yet

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