cross-fetch
npmv4.1.0TypeScriptUniversal WHATWG Fetch API for Node, Browsers and React Native
Adopt with care
cross-fetch is usable, with caveats. Last published 627 days ago. 2 releases in the last 2 years.
- AAdoption: grade A, Excellent.
32.9M downloads per week and 2 known dependents.
- CMaintenance: grade C, Fair — worth a look.
Last published 627 days ago. 2 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 5 transitive packages, about 271 KB 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 cross-fetch 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 cross-fetch, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- No constraint declared
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the cross-fetch README.
// Using ES6 modules with Babel or TypeScript
import fetch from 'cross-fetch';
// Using CommonJS modules
const fetch = require('cross-fetch');cross-fetch vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| cross-fetchthis page | 32.9M | 2 | MIT | 1 year ago |
| axios | 106.5M | 4 | MIT | 1 day ago |
| node-fetch | 172.9M | 9 | MIT | 1 day ago |
| undici | 158.5M | 15 | MIT | 1 day ago |
| p-limit | 293.1M | 5 | MIT | 1 day ago |
| p-locate | 216.9M | 1 | MIT | 1 day ago |
Dependencies
Declared by cross-fetch v4.1.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (1)
Dev (31)
Used by
Popular packages that depend on cross-fetch.
Relationship graph
Dependencies (left) and dependents (right) of cross-fetch.
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
Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST
A shim for the setImmediate efficient script yielding API
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.
Low-level network interception library for Node.js.
Release history
2 releases in the last two years, typically about 1 day apart.
| Version | Published | Size | License |
|---|---|---|---|
| 3.2.0 | 1 year ago | 91 KB | MIT |
| 4.1.0latest | 1 year ago | 91 KB | MIT |
| 4.0.0 | 3 years ago | 86 KB | MIT |
| 4.0.0-alpha.13 | 3 years ago | 86 KB | MIT |
| 3.1.8 | 3 years ago | 73 KB | MIT |
| 4.0.0-alpha.10 | 3 years ago | 86 KB | MIT |
| 3.1.7 | 3 years ago | 73 KB | MIT |
| 3.1.7-test.0 | 3 years ago | 73 KB | MIT |
| 4.0.0-alpha.5 | 3 years ago | 86 KB | MIT |
| 4.0.0-alpha.4 | 3 years ago | 86 KB | MIT |
| 3.1.6 | 3 years ago | 73 KB | MIT |
| 2.2.6 | 4 years ago | 66 KB | MIT |
| 3.1.5 | 4 years ago | 72 KB | MIT |
| 3.2.0-alpha.2 | 4 years ago | 86 KB | MIT |
| 3.2.0-alpha.1 | 4 years ago | 86 KB | MIT |
Overview
cross-fetch is an npm package that universal WHATWG Fetch API for Node, Browsers and React Native. It is extremely widely used, with about 32.9M downloads per week and 2 known dependents in the graph. The latest version is 4.1.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need universal WHATWG Fetch API for Node, Browsers and React Native and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (32.9M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- Large dependency tree (32 direct dependencies) increases install size and audit surface.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use cross-fetch?
cross-fetch is usable, with caveats. Last published 627 days ago. 2 releases in the last 2 years.
How do I install cross-fetch?
Run `npm install cross-fetch` to add cross-fetch to your npm project.
How many dependencies does cross-fetch have?
cross-fetch declares 32 direct dependencies and pulls in 5 packages in total once its runtime tree is resolved totalling about 271 KB on disk.
What license is cross-fetch released under?
cross-fetch is distributed under the MIT license.
How popular is cross-fetch?
cross-fetch has approximately 32,864,282 downloads per week and 2 known dependent packages.
Is cross-fetch still maintained?
The most recent release of cross-fetch (v4.1.0) was published 1 year ago.
Does cross-fetch run install scripts?
No. cross-fetch does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.