2.1.0 • Published 9 months ago

all-the-clocks v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

A simple EcmaScript 6 module that allows for simple clocks to be added (with one line!) to a web page. Current capabilities include:

  • Digital Clock
  • Digital Clock With Date
  • Stopwatch*

Future Functionality planned includes:

  • Analogue Clocks
  • Timers

Usage

Install using 'npm i all-the-clocks'. Import into your website using 'import {wanted clock} from "./node_modules/all-the-clocks/index.js" or the path that it leads to where you are in your folder. The import statement and such should be within a '' tag, otherwise it will not work. Types of clocks you can import include: -'clock': a normal digital clock.

  • 'clockWithDate': a digital clock with date.
  • 'stopWatch': a stopwatch. To initialise these clocks have a Javascript line of 'new "type of clock"()'. E.g. if a new stopwatch is wanted, do 'new stopWatch()'. Variable assignment isn't required and clocks will function independently. Note that for the base clock (plain digital) it must be initialised with 'new clock().init()' as it provides the templates for the others.

Additionally, the clocks (being contained in a viewbox) can be resized to your heart's content.

*Accurate to within a few milliseconds.

2.1.0

9 months ago

2.0.3

10 months ago

2.0.2

10 months ago

2.0.1

10 months ago

2.0.0

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago