Create a deferred promise
Forked from p-defer to add support for Custom Promise classes.
$ npm install p-custom-defer
Look at the test file for examples.
Returns an object
with a promise
property and functions to resolve()
and reject()
.
Returns an object
with a promise
property and functions to resolve()
and reject()
. Promise will constructed using the user promise cls with args. Custom Promise class constructor must contain an executor argument as the initial argument.