JSPM

header-case-normalizer

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11325
  • Score
    100M100P100Q139295F
  • License Apache-2.0

Converts HTTP headers to their most common casing. (e.g. usEr-Agent -> User-Agent)

Package Exports

  • header-case-normalizer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (header-case-normalizer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

header-case-normalizer

HTTP headers are case insensitive. That's why NodeJS makes them lower case by default. While sensible, sometimes, for example for compatibility reasons, you might need them in their more common form. This library converts them:

var normalizeHeaderCase = require("header-case-normalizer");
normalizeHeaderCase("user-agent") //-> "User-Agent"

Tested with a list from MDN.