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

Function race

lib/race.js:42–49  ·  view source on GitHub ↗
(tasks, callback)

Source from the content-addressed store, hash-verified

40 * });
41 */
42export default function race(tasks, callback) {
43 callback = once(callback || noop);
44 if (!isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions'));
45 if (!tasks.length) return callback();
46 for (var i = 0, l = tasks.length; i < l; i++) {
47 wrapAsync(tasks[i])(callback);
48 }
49}

Callers

nothing calls this directly

Calls 2

onceFunction · 0.85
wrapAsyncFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…