Bakhtina Sofya b84cb877be 1st comm 2 months ago
..
LICENSE b84cb877be 1st comm 2 months ago
README.md b84cb877be 1st comm 2 months ago
index.d.ts b84cb877be 1st comm 2 months ago
index.js b84cb877be 1st comm 2 months ago
index.js.map b84cb877be 1st comm 2 months ago
index.ts b84cb877be 1st comm 2 months ago
package.json b84cb877be 1st comm 2 months ago

README.md

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)