* Takes a node-style callback and returns new function that accepts a * promise, calling the original callback when the promise is either * fulfilled or rejected with the appropriate arguments. * * @example * var deferred = when.defer(); * * function callback(err, value) { * // Hand
(callback)
| 270 | * @returns {Function} The lifted, promise-accepting function. |
| 271 | */ |
| 272 | function liftCallback(callback) { |
| 273 | return function(promise) { |
| 274 | return bindCallback(promise, callback); |
| 275 | }; |
| 276 | } |
| 277 | }); |
| 278 | |
| 279 | })(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); }); |
nothing calls this directly
no test coverage detected
searching dependent graphs…