Bakhtina Sofya b84cb877be 1st comm | 2 months ago | |
---|---|---|
.. | ||
LICENSE | 2 months ago | |
README.md | 2 months ago | |
index.d.ts | 2 months ago | |
index.js | 2 months ago | |
index.js.map | 2 months ago | |
index.ts | 2 months ago | |
package.json | 2 months ago |
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)