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

@readme/http-headers

Package Overview
Dependencies
Maintainers
10
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@readme/http-headers - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

5

dist/index.js

@@ -78,7 +78,6 @@ "use strict";

function getHeader(header) {
var _a;
var normalizedHeader = (0, exports.normalizeHeader)(header);
if (!(0, exports.isHeaderValid)(normalizedHeader))
throw new Error("'".concat(header, "' is not a documented HTTP header."));
return http_headers_1.default[normalizedHeader];
return (_a = http_headers_1.default[normalizedHeader]) !== null && _a !== void 0 ? _a : {};
}
exports.default = getHeader;

2

package.json
{
"name": "@readme/http-headers",
"version": "0.0.2",
"version": "0.0.3",
"description": "Retrieve HTTP Header Descriptions from MDN",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -74,6 +74,3 @@ import type { HTTPHeader, HTTPHeaderDescription } from './types';

const normalizedHeader = normalizeHeader(header);
if (!isHeaderValid(normalizedHeader)) throw new Error(`'${header}' is not a documented HTTP header.`);
return HTTPHeaders[normalizedHeader];
return HTTPHeaders[normalizedHeader] ?? {};
}
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