1.0.3 • Published 2 years ago

@ts4/cron v1.0.3

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

@ts4/cron

@ts4/sleep advanced typescript sleep function with async/await

Installation

npm install @ts4/sleep

Usage

import sleep from '@ts4/sleep';
// or
import { sleep } from '@ts4/sleep';
// or
const sleep = require('@ts4/sleep');

(async () => {
    await sleep(1000); // sleep 1 sec
    await sleep([1000, 2000, 3000]); // random sleep 1 or 2 or 3 sec
    await sleep(1000, 2000); // random sleep between 1(inclusive) and 2(inclusive) sec
})();
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago