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