(promiseOrValue, callback, errback, progback)
| 178 | } |
| 179 | |
| 180 | function when (promiseOrValue, callback, errback, progback) { |
| 181 | // we can't just sniff for then(). if we do, resources that have a |
| 182 | // then() method will make dependencies wait! |
| 183 | if (isPromise(promiseOrValue)) { |
| 184 | return promiseOrValue.then(callback, errback, progback); |
| 185 | } |
| 186 | else { |
| 187 | return callback(promiseOrValue); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | /** |
| 192 | * Returns a function that when executed, executes a lambda function, |
no test coverage detected