@readme/http-headers
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -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; |
{ | ||
"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] ?? {}; | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
102768
1737