MCPcopy Create free account
hub / github.com/MathieuTurcotte/node-backoff / doSomething

Function doSomething

examples/set_timeout.js:17–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15var attempt = 1;
16
17function doSomething() {
18 if (attempt > 10) {
19 console.log('Success!');
20 strategy.reset();
21 return;
22 }
23
24 console.log('Attempt #' + attempt);
25 attempt++;
26 setTimeout(doSomething, strategy.next());
27}
28
29doSomething();

Callers 1

set_timeout.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected