@josephg/resolvable
Promise with .resolve() and .reject() methods
Last updated 6 years ago by josephg .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @josephg/resolvable 
SYNC missed versions from official npm registry.

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)

Current Tags

  • 1.0.1                                ...           latest (4 years ago)

2 Versions

  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE