MCPcopy Index your code
hub / github.com/nodejs/nodejs.org / sleep

Function sleep

apps/site/next.fetch.mjs:12–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10 e.cause.code === 'ETIMEDOUT';
11
12const sleep = ms => new Promise(r => setTimeout(r, ms));
13
14/**
15 * Does a fetch with retry logic for network errors and timeouts.

Callers 1

attemptFetchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected