MCPcopy Index your code
hub / github.com/nodejs/node / asyncLoop

Function asyncLoop

test/parallel/test-http-unix-socket-keep-alive.js:20–28  ·  view source on GitHub ↗
(fn, times, cb)

Source from the content-addressed store, hash-verified

18));
19
20function asyncLoop(fn, times, cb) {
21 fn(function handler() {
22 if (--times) {
23 setTimeout(() => fn(handler), common.platformTimeout(10));
24 } else {
25 cb();
26 }
27 });
28}
29
30function makeKeepAliveRequest(cb) {
31 http.get({

Calls 3

fnFunction · 0.70
cbFunction · 0.70
setTimeoutFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…