Thin wrapper around the native fetch (or node-fetch) that adds configurable timeout support, returning a custom error string when the timeout is exceeded. Version 0.0.2 is the latest stable release; the package is minimal and has no active development. Only suitable for simple timeout scenarios; does not support AbortController or signal-based cancellation. Alternatives include native AbortController (now widely supported) or libraries like 'ky' with built-in timeout.
npm install fetch-timeoutNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates using fetch-timeout to perform a GET request with a 5-second timeout and custom error string.
Upgrade to node-fetch v2 or v3 and use native AbortController for timeout.
Use AbortController for proper cancellation if needed.
Run 'npm install node-fetch@^1.6.3'
Install node-fetch: npm install node-fetch@^1.6.3
Increase timeout value or ensure server responds faster.
Install node-fetch: npm install node-fetch