whatwg-fetch

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

Library
npm
v3.6.20
25,847 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
56 /100 Fair
Development Activity 0
Maintenance 32
Community 92
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
75 /100 Good
Architecture 72
Code Quality 78
Innovation 55
Learning Curve 95

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

Databases · Low Code Platforms

15,623

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

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
Java
72%
Other

ByteChef

AI Agents · Automation

1,003

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

View details
85
Repo Health
82
Technical
67
Dependency
Built with
Java 72%
TypeScript 28%
Updated 6 days ago
JavaScript
90%
Other

CodeSandbox

Code Editors · Developer Tools

13,650

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

View details
67
Repo Health
76
Technical
62
Dependency
Built with
JavaScript 90%
Updated 3 weeks ago
Python
63%
BSD 3

Flagsmith

Ab Testing Experimentation · Developer Tools · Devops

6,577

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
90
Repo Health
82
Technical
63
Dependency
Built with
Python 63%
TypeScript 31%
Updated 1 weeks ago
TypeScript
48%
AGPL 3.0

Grafana

Analytics · Monitoring

76,962

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
63
Dependency
Built with
TypeScript 48%
Go 46%
Updated 5 days ago
TypeScript
98%
Other

Kibana

Analytics · Monitoring

21,301

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
63
Dependency
Built with
TypeScript 98%
Updated 5 days ago
Python
69%
MIT

Langflow

AI Agents · AI Development

155,319

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

View details
90
Repo Health
85
Technical
65
Dependency
Built with
Python 69%
TypeScript 22%
Updated 5 days ago
Python
58%
Apache 2.0

MLflow

AI Development · Monitoring

28,154

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
66
Dependency
Built with
Python 58%
TypeScript 33%
Updated 5 days ago
Python
64%
Other

Onyx

AI Agents · AI Assistants · Knowledge Management

32,262

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
68
Dependency
Built with
Python 64%
TypeScript 26%
Updated 6 days ago

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