doomsday-clock
v2.0.0
Published
Get the time until midnight according to the Doomsday Clock.
Downloads
8
Maintainers
Readme
doomsday-clock
Get the time until midnight according to the Doomsday Clock.
Install
npm install doomsday-clock
Usage
const doomsdayClock = require("doomsday-clock");
(async () => {
const { seconds } = await doomsdayClock();
console.log(`There are ${seconds} seconds 'till midnight!`);
})();
API
doomsdayClock()
Return data
seconds
Type: number
The amount of seconds left.
source
Type: string
The statement that the minutes were sourced from.
time
Type: string
The amount of time left as represented as HH:mm:ss A
.
Migrating from v1
- Node.js 10 or later is now required.
- Support for callbacks have been removed.
- The
seconds
value is now provided instead ofminutes
.