Ls Countup
Just a simple count up.
Instalation
npm i ls-countup
How to:
// Import all stuffconst LsCountup LsCountupOptions LsCountupSufixes = // Target date to be the reference for the countupconst targetDate = /* MUST BE A BACKWARD DATE */ // Event dispatched right after the countup startsconst onStart = { /* Do whatever you want... */ } // Event dispatched ever 1 secondconst onTick = { /* Do whatever you want... */ } // Event dispatched right after the countup stopsconst onStop = { /* Do whatever you want... */ } // You can use the LsCountupSufixes class to change the sufixes of the tick on return// This is the defaults: { days: 'd', hours: 'h', minutes: 'm', seconds: 's' }const sufixes = days: ' days' hours: ' hours' minutes: ' minutes' seconds: ' seconds' // Create a new options class with the parametersconst options = targetDate onStart onTick onStop sufixes // Create a new countup classconst countup = options // starts to countupcountupstart; // changes countup target dateconst newTargetDate = /* MUST BE A BACKWARD DATE */countup // stops to countupcountup