every-ready
v1.1.0
Published
A promise that resolves when multiple values are set.
Downloads
22
Readme
Every ready
A promise that resolves when multiple values are set.
Install
npm install every-ready
Usage
const EveryReady = require("every-ready");
const evReady = new EveryReady(2);
evReady.readiness[0] = true;
evReady.ready;
// false
evReady.readiness[1] = true;
evReady.ready;
// true
API
class EveryReady(expect) extends WheneverReady
expect
Type: number
The amount of values that must be truthy.
instance EveryReady
readiness
Type: array
The readiness values to set.
ready
See WheneverReady docs.
when()
See WheneverReady docs.