|
hai 3 meses | |
---|---|---|
.. | ||
LICENSE | hai 3 meses | |
README.md | hai 3 meses | |
index.d.ts | hai 3 meses | |
index.js | hai 3 meses | |
index.js.map | hai 3 meses | |
index.ts | hai 3 meses | |
package.json | hai 3 meses |
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)