whenever-ready
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Whenever ready Travis CI Build Status

A promise that resolves when a value is set.

NPM Badge

Install

npm install whenever-ready

Usage

const WheneverReady = require("whenever-ready");
const wReady = new WheneverReady();
 
wReady.when().then(() => console.log("READY!")); // Listen for readiness.
wReady.ready = true; // Set as ready.

API

class WheneverReady(ready?)

ready

Type: boolean
Default: false

The initial readiness value.

instance WheneverReady

ready

Type: boolean
Default: false

The readiness.

when()

Returns: Promise

Returns a promise that will resolve when ready is true.

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i whenever-ready

    Weekly Downloads

    1

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    3.75 kB

    Total Files

    6

    Last publish

    Collaborators

    • richienb