/next-await

Primary LanguageJavaScriptMIT LicenseMIT

next-await

Build Status Modern Node

Always be able to wait for a next promise

Installation

yarn add https://github.com/leobastiani/next-await

If you're using npm you can use: npm install https://github.com/leobastiani/next-await.

Usage

const { withNextAwait } = require('next-await')

const nextAwait = withNextAwait({})
const promise = nextAwait.nextAwait
console.log(promise)
nextAwait.nextAwait.resolve(123)
console.log(promise)
console.log(nextAwait.nextAwait)

License

MIT