sleep-es6

Sleep with Promise

Usage no npm install needed!

<script type="module">
  import sleepEs6 from 'https://cdn.skypack.dev/sleep-es6';
</script>

README

sleep-es6

Sleep with Promise

NPM version Build Status Dependency Status Coverage percentage experimental

Install

npm install sleep-es6 --save

or

yarn add sleep-es6

Usage

import { sleep } from "sleep-es6";

sleep(1000).then(()=>console.log("after 1000ms"));

API

function sleep(timeout: number): Promise<void>;

Test

npm install
npm test