whatwg-fetch

A lightweight polyfill bringing the window.fetch API to browsers that lack native support

Library
npm
v3.6.20
25,856stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
56/100Fair
Development Activity0
Maintenance32
Community92
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
75/100Good
Architecture72
Code Quality78
Innovation55
Learning Curve95

whatwg-fetch is a polyfill implementation of the WHATWG Fetch specification, providing window.fetch, Request, Response, and Headers globals for browsers and environments that don’t natively support the Fetch API. It was originally maintained under GitHub’s own github/fetch organization (the repository has since transferred to its original author, JakeChampion) and became one of the most widely depended-on polyfills in the npm ecosystem during the transition away from XMLHttpRequest-based HTTP calls.

The library is a single-file implementation (fetch.js) with no runtime dependencies, designed to be dropped into any project needing standards-compliant fetch behavior in legacy environments, and is commonly pulled in transitively by build tooling and older browser-support configurations.

What You Get

  • A drop-in polyfill for window.fetch, Request, Response, and Headers
  • Standards-aligned behavior matching the WHATWG Fetch specification
  • Zero runtime dependencies, distributed as a single small JS file
  • UMD and ES module builds for use with bundlers or via a <script> tag
  • Long-standing browser test coverage via Karma across Chrome, Firefox, and Safari launchers

Common Use Cases

  • Supporting fetch-based HTTP calls in older browsers (legacy IE/Edge, older Safari) that lack native fetch
  • Providing a consistent fetch implementation in test/CI environments (e.g. jsdom) that don’t implement fetch
  • Bundled transitively into build tooling or UI libraries that assume fetch is globally available
  • Server-side or non-browser JS environments needing a spec-compliant fetch surface without a full HTTP client

Under The Hood

Architecture: The entire polyfill lives in a single fetch.js file (~640 lines) that conditionally defines self.fetch only if it’s not already present, implementing Headers, Request, Response, and Body as constructor functions backed by XMLHttpRequest under the hood for the actual network transport — the Fetch-shaped API is a wrapper translating Fetch semantics (streams, promises) onto XHR’s callback-based model.

Tech Stack: Plain ES5-compatible JavaScript with no runtime dependencies; built via Rollup (rollup.config.js) to produce UMD and ES module bundles, tested with Karma against real browser launchers (Chrome, Firefox, Safari) rather than a headless DOM shim, which is notable rigor for a polyfill of this vintage.

Code Quality: The test/test.js suite exercises Fetch-spec edge cases (header case-insensitivity, response cloning, body-already-used errors) rather than just happy-path calls. The single-file design keeps the surface area small and easy to audit, though the project has seen no commits since mid-2024, meaning it now trails the evolving Fetch spec (e.g. newer Request/Response options) rather than actively tracking it.

API Design: By design, the polyfill’s API is not its own — it faithfully mirrors the native fetch()/Request/Response/Headers globals, so there is effectively zero learning curve for anyone already familiar with the standard Fetch API; usage is simply importing the package for its side effect of defining the global.

Used by 16 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,526

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
53
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated 9 months ago
Java
73%
Other

ByteChef

Automation · AI Agents

990

Unified open-source platform for AI agent orchestration and workflow automation with 180+ connectors, MCP support, and durable execution.

View details
81
Repo Health
82
Technical
73
Dependency
Built with
Java73%
TypeScript26%
Updated 2 days ago
JavaScript
90%
Other

CodeSandbox

Code Editors · Developer Tools

13,633

Instantly ready browser-based IDE that runs full npm dependency resolution and transpilation entirely client-side, with no server needed.

View details
65
Repo Health
76
Technical
63
Dependency
Built with
JavaScript90%
Updated 1 months ago
Python
64%
BSD 3

Flagsmith

Developer Tools · Devops · Ab Testing Experimentation

6,518

Open-source feature flagging, remote config, and A/B/multivariate testing platform for web, mobile, and server-side apps — self-host or use the hosted SaaS.

View details
91
Repo Health
82
Technical
65
Dependency
Built with
Python64%
TypeScript31%
Updated today
TypeScript
48%
AGPL 3.0

Grafana

Monitoring · Analytics

76,300

The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.

View details
95
Repo Health
91
Technical
65
Dependency
Built with
TypeScript48%
Go46%
Updated today
TypeScript
97%
Other

Kibana

Analytics · Monitoring

21,251

Your open source window into the Elastic Stack — query, visualize, and act on data stored in Elasticsearch with real-time dashboards, AI-assisted search, and automated alerting.

View details
98
Repo Health
87
Technical
68
Dependency
Built with
TypeScript97%
Updated today
Python
68%
MIT

Langflow

AI Agents · AI Development

153,450

Build, test, and deploy AI agents and RAG workflows visually with native API and MCP server export.

View details
90
Repo Health
85
Technical
66
Dependency
Built with
Python68%
TypeScript22%
Updated today
Python
58%
Apache 2.0

MLflow

AI Development · Monitoring

27,573

The open source AI engineering platform for debugging, evaluating, monitoring, and optimizing production LLMs and agents at scale.

View details
97
Repo Health
86
Technical
68
Dependency
Built with
Python58%
TypeScript33%
Updated today
Python
66%
Other

Onyx

AI Assistants · AI Agents · Knowledge Management

31,658

Self-hostable AI platform with agentic RAG, 50+ connectors, deep research, code execution, and support for every major LLM provider.

View details
92
Repo Health
83
Technical
72
Dependency
Built with
Python66%
TypeScript28%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search