Countdown.js
Deadly simple countdown & stopwatch written in Typescript.
Install
Node.js 6x or newer is required!
To install the package (latest version) run
npm install @igorkowalczyk/countdown
[NPM]
or
yarn install @igorkowalczyk/countdown
[Yarn]
Example usage
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
Features
- 📝 Dead simple
- ✨ Really fast
- 😅 Easy to use
- 📚 Build-in stopwatch
- 🕐 Custom running time
Development
Package
- To build the script to
/dist
folder runnpm run build
Docs
- To build the dosc please run
npm run docs
Links
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