@igorkowalczyk/countdown
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Countdown.js

📥 Installation

npm install @igorkowalczyk/countdown
yarn add @igorkowalczyk/countdown
pnpm add @igorkowalczyk/countdown

[!NOTE] This package can be used in both CommonJS and ESM environments.

📦 Usage

ESM

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

CommonJS

const Timer = require("@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 have any issues with this package please create new issue here

📥 Pull Requests

When submitting a pull request:

  • Clone the repo.
  • Create a branch off of master and give it a meaningful name (e.g. my-awesome-new-feature).
  • Open a pull request on GitHub and describe the feature or fix.

📋 License

This project is licensed under the MIT. See the LICENSE file for details

Package Sidebar

Install

npm i @igorkowalczyk/countdown

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

17.4 kB

Total Files

8

Last publish

Collaborators

  • igorkowalczyk