es7-sleep

1.0.0 • Public • Published

es7-sleep

NPM version Build Status Downloads

ES7 sleep function with async/await

Install

npm install es7-sleep

Usage

import sleep from "es7-sleep";

async () => {
    ...

    while(!result) {
        await sleep(1000);
        result = redis.get(key);
    }

    ...
}

License

MIT

Package Sidebar

Install

npm i es7-sleep

Weekly Downloads

698

Version

1.0.0

License

MIT

Last publish

Collaborators

  • secbone