Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 808 Bytes

README.md

File metadata and controls

42 lines (29 loc) · 808 Bytes

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