simple-countdown
This is a simple countdown timer that emits events.
Get started
npm install
Usage
const Timer = const timer = minutes: 5 timerformattedDuration // '00:05:00' timer timer timer // when you are ready start the timertimerstart
You can use the moment.duration
api to create your intervals:
Key | Shorthand |
---|---|
years | y |
months | M |
weeks | w |
days | d |
hours | h |
minutes | m |
seconds | s |
milliseconds | ms |
minutes: 3 seconds: 30 ||