1.0.2 • Published 3 years ago
@creinpl/counters v1.0.2
@creinpl/counters
Package with two counters Counter
and DecreasingCounter
constructors.
Instalation
npm install @creinpl/counters
Usage
To run demo app clone this repo and simply run
npm install
npm start
API
Every counter gets one argument - selector of element to be rendered in.
Counter shoul be initialized after creation by calling .init()
method.
import { Counter, DecreasingCounter } from '@creinpl/counters'
const counter1 = new Counter('.counter-1', 5)
counter1.init()
const counter2 = new DecreasingCounter('.counter-2', -11)
counter2.init()