simple-delay
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Simple Delay

Create a promise that resolves after a certain amount of time

Usages

Basic

import delay from 'simple-delay'
delay(5000).then(() => console.log('5 seconds have passed'))

Supply your own setTimeout

import { callSetTimeout } from 'simple-delay'
const mySetTimeout = setTimeout
callSetTimeout(mySetTimeout, 5000).then(() => console.log('5 seconds have passed'))

License

MIT © Hoàng Văn Khải

Readme

Keywords

Package Sidebar

Install

npm i simple-delay

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

2.44 kB

Total Files

5

Last publish

Collaborators

  • khai96_