npm install @igorkowalczyk/countdown
yarn add @igorkowalczyk/countdown
pnpm add @igorkowalczyk/countdown
import Timer from "@igorkowalczyk/countdown";
const timer = new Timer();
timer.on("tick", (ms) => console.log("tick", ms));
timer.on("done", () => console.log("done!"));
timer.on("statusChanged", (status) => console.log("Status: ", status));
timer.start(20000); // Timer for 20s
If you come across any errors or have suggestions for improvements, please create a new issue here and describe it clearly.
When submitting a pull request, please follow these steps:
- Clone this repository
https://github.com/IgorKowalczyk/countdown.git
- Create a branch from
main
and give it a meaningful name (e.g.my-awesome-new-feature
). - Open a pull request on GitHub and clearly describe the feature or fix you are proposing.
This project is licensed under the MIT. See the LICENSE file for details