@chengaoyuan/sleep
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

sleep

npm version install size NPM Downloads Build Status Coverage Status

Installation

$ npm install @chengaoyuan/sleep

Usage

import sleep from "@chengaoyuan/sleep";
async function func() {
    console.log(Date.now());
    await sleep(1000); // sleep 1s
    console.log(Date.now());
}
func();

Testing

$ npm test

/@chengaoyuan/sleep/

    Package Sidebar

    Install

    npm i @chengaoyuan/sleep

    Weekly Downloads

    1

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    3.59 kB

    Total Files

    6

    Last publish

    Collaborators

    • chengaoyuan