Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 813 Bytes

README.md

File metadata and controls

44 lines (29 loc) · 813 Bytes

sleep

version status

A promise-based sleep function for Deno.

Contents

Features

  • Minimal and easy to use.
  • Can be used to await for a specified amount of time.

Install

For Deno:

$ deno add @117/sleep

Example

import { sleep } from "@117/sleep";

const work = async () => {
    console.log("please wait for 2 seconds");
    await sleep(2000);
    console.log("thanks for waiting");
};

work();

Contributing

Feel free to contribute and PR to your 💖's content.