A utility library (v4.6.2) that handles fetch errors, rate limits, and caching for HTTP requests. It automatically waits and retries when rate limits are encountered for APIs like Auth0, GitHub, and Zalando. Ships TypeScript types. Small bundle size. Active development with regular releases. Differentiators: supports ETag caching, configurable retry logic, and handlers for redirects, errors, and state action. ESM-only.
npm install fetch-rate-limit-utilNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of stateActionHandler with retry and caching, including TypeScript types.
Upgrade Node.js to version 12 or higher, or use an older version (v3.x).
Use import statements or configure your project for ESM (e.g., type: module in package.json).
Use named imports like import { stateActionHandler } from 'fetch-rate-limit-util'.Chain multiple handlers or use stateActionHandler which integrates them.
Add 'type': 'module' to package.json or use .mjs extension.
Use correct named import: import { stateActionHandler } from 'fetch-rate-limit-util'.No dependency data recorded yet.