A function that creates a Bluebird promise that can be resolved or rejected using a Node-style callback.
make-promise exports a single function, which takes a function as it sole argument. After you have called
makePromise, this function is called immediately afterwards with a Node-style callback as its sole argument.
- Calling the callback with a truthy error argument will cause the promise to be rejected with the value of the error argument.
- Calling the callback with a falsy error argument will cause the promise to be fulfilled with the value of the result argument. If there is no result argument, the promise will be fulfilled with
var skyIsFalling = falsevar makePromise =var promise =promise
make-promise is released under the MIT License.
Copyright (c) 2017 Braveg1rl