Skip to content

josephg/resolvable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published