</>PackageGraphPackageGraph

cross-fetch

npmv4.1.0TypeScript

Universal 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.

1
Direct dependencies

Runtime packages this one declares itself.

5
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

271 KB
Install size

Unpacked size of this package plus its entire runtime tree.

3
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

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.

javascriptFull 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.

PackageWeekly downloadsDependentsLicenseLast release
cross-fetchthis page32.9M2MIT1 year ago
axios106.5M4MIT1 day ago
node-fetch172.9M9MIT1 day ago
undici158.5M15MIT1 day ago
p-limit293.1M5MIT1 day ago
p-locate216.9M1MIT1 day ago

Dependencies

Declared by cross-fetch v4.1.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (31)

@commitlint/cli 17.6.6@commitlint/config-conventional 17.6.6@types/chai 4.3.5@types/mocha 10.0.1@types/node 18.15.13body-parser 1.20.2chai 4.3.7codecov 3.8.3commitizen 4.3.0cz-conventional-changelog 3.3.0express 4.18.2husky 8.0.3lint-staged 13.2.3mocha 10.2.0mocha-headless-chrome 4.0.0nock 13.3.1nyc 15.1.0rimraf 5.0.1rollup 3.26.0rollup-plugin-copy 3.4.0rollup-plugin-esbuild 6.1.1rollup-plugin-esbuild-minify 1.1.2semver 7.5.3serve-index 1.9.1standard 17.1.0standard-version 9.5.0typescript 5.1.6webpack 5.88.1webpack-cli 5.1.4whatwg-fetch 3.6.20yargs 17.7.2

Used by

Popular packages that depend on cross-fetch.

Relationship graph

Dependencies (left) and dependents (right) of cross-fetch.

node-fetchmswfbjscross-fetch
cross-fetch dependencies dependents

Frequently installed together

Release history

2 releases in the last two years, typically about 1 day apart.

Recent versions of cross-fetch
VersionPublishedSizeLicense
3.2.01 year ago91 KBMIT
4.1.0latest1 year ago91 KBMIT
4.0.03 years ago86 KBMIT
4.0.0-alpha.133 years ago86 KBMIT
3.1.83 years ago73 KBMIT
4.0.0-alpha.103 years ago86 KBMIT
3.1.73 years ago73 KBMIT
3.1.7-test.03 years ago73 KBMIT
4.0.0-alpha.53 years ago86 KBMIT
4.0.0-alpha.43 years ago86 KBMIT
3.1.63 years ago73 KBMIT
2.2.64 years ago66 KBMIT
3.1.54 years ago72 KBMIT
3.2.0-alpha.24 years ago86 KBMIT
3.2.0-alpha.14 years ago86 KBMIT

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

Keywords

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.