1.0.0 • Published 4 years ago
delay-date v1.0.0
delay-date
Delay a promise until a specified date.
Install
npm install delay-date
Usage
const addTime = require("add-time");
const delayDate = require("delay-date");
bar();
await delayDate(addTime.now({ seconds: 1 }));
// Executed a second later
baz();
API
delayDate(date)
date
Type: Date | string | number
The date to wait for.