https://github.com/igorkowalczyk/countdown
⏱️ Fast, accurate and lightweight countdown & stopwatch written in Typescript.
https://github.com/igorkowalczyk/countdown
countdown javascript ts typescript
Last synced: about 1 year ago
JSON representation
⏱️ Fast, accurate and lightweight countdown & stopwatch written in Typescript.
- Host: GitHub
- URL: https://github.com/igorkowalczyk/countdown
- Owner: IgorKowalczyk
- License: mit
- Created: 2020-03-17T19:54:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-04-13T13:13:22.000Z (about 1 year ago)
- Last Synced: 2025-04-13T17:18:01.759Z (about 1 year ago)
- Topics: countdown, javascript, ts, typescript
- Language: TypeScript
- Homepage: https://npm.im/@igorkowalczyk/countdown
- Size: 3.65 MB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.md
Awesome Lists containing this project
README

## 📥 Installation
```
npm install @igorkowalczyk/countdown
yarn add @igorkowalczyk/countdown
pnpm add @igorkowalczyk/countdown
```
## 📦 Usage
```ts [example.ts]
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
```
## ⁉️ Issues
If you come across any errors or have suggestions for improvements, please create a [new issue here](https://github.com/igorkowalczyk/countdown/issues) and describe it clearly.
## 📥 Pull Requests
When submitting a pull request, please follow these steps:
- Clone [this repository](https://github.com/igorkowalczyk/countdown) `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](https://github.com/igorkowalczyk/countdown/pulls) on [GitHub](https://github.com/) and clearly describe the feature or fix you are proposing.
## 📋 License
This project is licensed under the MIT. See the [LICENSE](https://github.com/igorkowalczyk/countdown/blob/master/license.md) file for details