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

browser-headers

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-headers - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

17

lib/BrowserHeaders.js

@@ -142,9 +142,14 @@ "use strict";

BrowserHeaders.prototype.toHeaders = function () {
var headers = new Headers();
this.forEach(function (key, values) {
values.forEach(function (value) {
headers.append(key, value);
if (typeof Headers !== "undefined") {
var headers_1 = new Headers();
this.forEach(function (key, values) {
values.forEach(function (value) {
headers_1.append(key, value);
});
});
});
return headers;
return headers_1;
}
else {
throw new Error("Headers class is not defined");
}
};

@@ -151,0 +156,0 @@ return BrowserHeaders;

{
"name": "browser-headers",
"version": "0.2.0",
"version": "0.2.1",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "types": "lib/index.d.ts",

@@ -164,11 +164,13 @@ import { normalizeName, normalizeValue, getHeaderValues, getHeaderKeys, splitHeaderValue } from "./util";

toHeaders(): WindowHeaders {
const headers: WindowHeaders = new Headers();
this.forEach((key, values) => {
values.forEach(value => {
headers.append(key, value);
if (typeof Headers !== "undefined") {
const headers: WindowHeaders = new Headers();
this.forEach((key, values) => {
values.forEach(value => {
headers.append(key, value);
});
});
});
return headers;
return headers;
} else {
throw new Error("Headers class is not defined");
}
}

@@ -175,0 +177,0 @@ }

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