1.0.2 • Published 12 months ago

@dmc-towns/delay-promise v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Delay Promise

A function to return a promise that resolves to a supplied object after a specified delay

Installation

npm install @dmc-towns/delay-promise

Usage

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
1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago