@josephg/resolvable
v1.0.1
Published
Promise with .resolve() and .reject() methods
Downloads
4,575,470
Readme
Resolvable promise wrapper
This is a tiny promise wrapper which gives you promises which have explicit promise.resolve()
/ promise.reject()
methods.
Eg:
const resolvable = require('resolvable')
const myPromise = resolvable()
;(async () => {
doThingA()
await myPromise
doThingB()
})()
setTimeout(() => myPromise.resolve(), 1000)