1.1.0 • Published 4 years ago

@miciula/counters v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

@miciula/counters

Package with two counters Counter and DecreasingCounter constructors.

Installation

npm install @miciula/counters

Usage

To run demo app clone this repo and simply run:

npm instal
npm start

API

every counter gets two arguments

  1. selector of element to be rendered in
  2. start number (optional, defaults to 0)

Countrer should be initialized after creation by calling .init() method

import { Counter, DecreasingCounter } from '@miciula/counters'

const counter1 = new Counter ('.counter-1', 5)
counter1.init()

const counter2 = new DecreasingCounter ('.counter-2', -11)
counter2.init()
1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago