@hijup/check-header

Check if a header name or header value is valid.

Stats

stars 🌟issues ⚠️updated πŸ› created 🐣size πŸ‹οΈβ€β™€οΈ
00Feb 23, 2018Feb 23, 2018Minified + gzip package size for @hijup/check-header in KB

Readme

check-header

Check if a header name or header value is valid.

https://tools.ietf.org/html/rfc7230#section-3.2.6

This is a simpler version of node's internal optimized header validation and should stay compatible with it. If the corresponding tests are not updated with node's tests, please open an issue or submit a PR.

install

$ npm install check-header

example

import { validHeaderName, validHeaderValue } from 'check-header'

validHeaderName('foo') // => true
validHeaderName('@@') // => false

validHeaderValue('hey') // => true
validHeaderValue('δΈ­ζ–‡ε‘’') // => false

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.