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

header-field

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

header-field

Properly format a header field into a lowercased hyphenated string.

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23
decreased by-54%
Maintainers
1
Weekly downloads
 
Created
Source


Header-Field
API Stability TypeScript Styled with prettier Build status Test Coverage NPM Version Downloads Browser Bundle Size

Transform header fields into a properly formatted string, with lowercase characters and hyphens.

Installation

Npm
npm install header-field

Example

import { normalize } from "header-field";

normalize("content-type"); //-> "content-type"
normalize("content-Length"); //-> "content-length"
normalize("Content-Disposition"); //-> "content-disposition"

// Special case: referrer -> referer.
normalize("Referrer"); //-> "referer"

Contributions

  • Use npm test to build and run tests.

Please feel free to create a PR!

Keywords

FAQs

Package last updated on 14 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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