@msfapigithub/counters
v1.1.0
Published
Package with two counters `Counter` and `DecreasingCounter` constructors.
Downloads
41
Readme
@msfapigithub/counters
Package with two counters Counter and DecreasingCounter constructors.
Installation
npm install @msfapigithub/countersUsage
To run demo app clone this repo and simply run:
npm installnpm startAPI
Every counter gets two arguments:
- selector of element to be rendered in
- start number (optional, default 0)
import { Counter, DecreasingCounter } from '@msfapigithub/counters'
const counter1 = new Counter('.counter-1', 5)
counter1.init()
const counter2 = new DecreasingCounter('.counter-2', -11)
counter2.init()