* Takes a node-style async function and calls it immediately (with an optional * array of arguments or promises for arguments). It returns a promise whose * resolution depends on whether the async functions calls its callback with the * conventional error argument or not. * * With this it
(f, args)
| 59 | * @returns {Promise} promise for the value func passes to its callback |
| 60 | */ |
| 61 | function apply(f, args) { |
| 62 | return _apply(f, this, args || []); |
| 63 | } |
| 64 | |
| 65 | function dispatch(f, thisArg, args, h) { |
| 66 | var cb = createCallback(h); |