MCPcopy
hub / github.com/cujojs/when / runTask

Function runTask

pipeline.js:32–38  ·  view source on GitHub ↗
(args, task)

Source from the content-addressed store, hash-verified

30 // Self-optimizing function to run first task with multiple
31 // args using apply, but subsequence tasks via direct invocation
32 var runTask = function(args, task) {
33 runTask = function(arg, task) {
34 return task(arg);
35 };
36
37 return task.apply(null, args);
38 };
39
40 return all(slice.call(arguments, 1)).then(function(args) {
41 return when.reduce(tasks, function(arg, task) {

Callers 1

pipeline.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…