@josephg/resolvable
v1.0.1
Published
Promise with .resolve() and .reject() methods
Downloads
5,269,437
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)