1.0.1 • Published 3 years ago

simplechronometer v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

simpleChronometer

Simple, high precision chronometer for browsers.

timer

Usage

import simpleChronometer from 'simplechronometer';

const {
  element, // Html element of timer
  start, // Start the timer
  pause, // Pause the timer
  reset, // Stop and reset the timer
  getTime, // Get elapsed time as milliseconds
} = simpleChronometer({
  showMilliSecond: true, // Show milliseconds (default false)
  querySelector: '#target', // Selector to replace with the timer on the dom(optional, you can later manually insert the element to the DOM as well)
  color: 'white', // Text color (default white)
  bgColor: 'black', // Background color (default black)
  borderColor: 'black', // Border color (default black)
  size: 'medium', // Size of timer: [xlarge,large,medium,small,xsmall] (default medium)
});

Dependencies

This component uses htmlElementGenerator to render its element.

Tests

npm install

npm run test

1.0.1

3 years ago

1.0.0

3 years ago