headers-polyfill
npmv5.0.1A native "Headers" class polyfill.
Safe to adopt
Yes — headers-polyfill scores well across adoption, maintenance, weight, supply chain, and licensing. 13.6M downloads per week and 1 known dependents. Last published 188 days ago. 2 releases in the last 2 years.
- AAdoption: grade A, Excellent.
13.6M downloads per week and 1 known dependents.
- BMaintenance: grade B, Good.
Last published 188 days ago. 2 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 4 transitive packages, about 2.7 MB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding headers-polyfill to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing headers-polyfill, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- No constraint declared
- Module format
- ESM + CommonJS
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the headers-polyfill README.
import { Headers } from 'headers-polyfill'
const headers = new Headers({
Accept: '*/*',
'Content-Type': 'application/json',
})
headers.get('accept') // "*/*"Dependencies
Declared by headers-polyfill v5.0.1. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (6)
Used by
Popular packages that depend on headers-polyfill.
Relationship graph
Dependencies (left) and dependents (right) of headers-polyfill.
Frequently installed together
A collection of essential TypeScript types
An extremely fast JavaScript and CSS bundler and minifier.
An HTTP/1.1 client, written from scratch for Node.js
Prettier is an opinionated code formatter
Promise based HTTP client for the browser and node.js
Fast, unopinionated, minimalist web framework
Next generation testing framework powered by Vite
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
A Query Language and Runtime which can target any service.
Universal WHATWG Fetch API for Node, Browsers and React Native
Low-level network interception library for Node.js.
Fast and low overhead web framework, for Node.js
Release history
2 releases in the last two years, typically about 5 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 5.0.1latest | 6 months ago | 110 KB | MIT |
| 5.0.0 | 6 months ago | 110 KB | MIT |
| 4.0.3 | 2 years ago | 131 KB | MIT |
| 4.0.2 | 2 years ago | 130 KB | MIT |
| 4.0.1 | 3 years ago | 130 KB | MIT |
| 4.0.0 | 3 years ago | 130 KB | MIT |
| 3.3.0 | 3 years ago | 130 KB | MIT |
| 3.2.5 | 3 years ago | 125 KB | MIT |
| 3.2.4 | 3 years ago | 114 KB | MIT |
| 3.2.3 | 3 years ago | 109 KB | MIT |
| 3.2.2 | 3 years ago | 89 KB | MIT |
| 3.2.1 | 3 years ago | 56 KB | MIT |
| 3.2.0 | 3 years ago | 55 KB | MIT |
| 3.1.2 | 3 years ago | 53 KB | MIT |
| 3.1.1 | 3 years ago | 53 KB | MIT |
Overview
headers-polyfill is an npm package that a native "Headers" class polyfill. It is extremely widely used, with about 13.6M downloads per week and 1 known dependents in the graph. The latest version is 5.0.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need a native "Headers" class polyfill and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (13.6M weekly downloads).
- Clear open-source license (MIT).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use headers-polyfill?
Yes — headers-polyfill scores well across adoption, maintenance, weight, supply chain, and licensing. 13.6M downloads per week and 1 known dependents. Last published 188 days ago. 2 releases in the last 2 years.
How do I install headers-polyfill?
Run `npm install headers-polyfill` to add headers-polyfill to your npm project.
How many dependencies does headers-polyfill have?
headers-polyfill declares 8 direct dependencies and pulls in 4 packages in total once its runtime tree is resolved totalling about 2.7 MB on disk.
What license is headers-polyfill released under?
headers-polyfill is distributed under the MIT license.
How popular is headers-polyfill?
headers-polyfill has approximately 13,642,064 downloads per week and 1 known dependent packages.
Is headers-polyfill still maintained?
The most recent release of headers-polyfill (v5.0.1) was published 6 months ago.
Does headers-polyfill run install scripts?
No. headers-polyfill does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.