native-fetch

JSON →
library 4.0.2 ·javascript
verified Jun 7, 2026

A polyfill-aware module that returns the native fetch/Request/Headers API if available in the runtime, otherwise falls back to the undici module. Version 4.0.2 is the current stable release; the package has frequent updates aligned with undici releases. Key differentiator: unlike node-fetch, it uses WHATWG streams for type compatibility and provides a seamless way to write isomorphic code without heavy-handed bundler overrides. Ships TypeScript types. Requires undici as a peer dependency.