MCPcopy
hub / github.com/caolan/async / forever

Function forever

lib/forever.js:36–45  ·  view source on GitHub ↗
(fn, errback)

Source from the content-addressed store, hash-verified

34 * );
35 */
36export default function forever(fn, errback) {
37 var done = onlyOnce(errback || noop);
38 var task = wrapAsync(ensureAsync(fn));
39
40 function next(err) {
41 if (err) return done(err);
42 task(next);
43 }
44 next();
45}

Callers

nothing calls this directly

Calls 4

onlyOnceFunction · 0.85
wrapAsyncFunction · 0.85
ensureAsyncFunction · 0.85
nextFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…