@dmc-towns/delay-promise
v1.0.2
Published
A function to return a promise that resolves to a supplied object after a specified delay
Maintainers
Readme
Delay Promise
A function to return a promise that resolves to a supplied object after a specified delay
Installation
npm install @dmc-towns/delay-promiseUsage
import { delayPromise } from '@dmc-towns/delay-promise'
const result = await delayPromise('foo', 1000)
// result will contain a Promise that resolves to 'foo' after 1 second