countdowner
v1.0.3
Published
countdown as you call it
Downloads
1
Readme
A simple countdown timer management program
Using npm:
$ npm i countdowner --save
Guides
import countdown from "countdowner";
// when your send a verification code
let ct = countdown({
time: 60, //second
key: "your_ct_key",
cb: (res) => {
console.log('ct res:', res);
this.isCounting = !res.finish;
this.rtCount = res.count;
},
});
// when check old countdown (trigger param is isCheck)
let ct = countdown({
key: "your_ct_key",
isCheck: true, //run countdown or checkout countdown (true means check)
debug: true,
cb: (res) => {
console.log('ct res:', res);
this.isCounting = !res.finish;
this.rtCount = res.count;
},
});
// when you need manually stop
ct.reset();