countdowner

1.0.3 • Public • Published

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();

/countdowner/

    Package Sidebar

    Install

    npm i countdowner

    Weekly Downloads

    0

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    2.48 kB

    Total Files

    3

    Last publish

    Collaborators

    • spartaattack