0.0.7 • Published 3 years ago

@meteora-digital/timesheet v0.0.7

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

Timesheet

A class to create and toggle multiple timers to help improve time keeping.

See it in action

Installation

npm i @meteora-digital/timesheet
yarn add @meteora-digital/timesheet

Usage

import Timesheet from '@meteora-digital/timesheet';

const Clock = new Timesheet;

Clock.add('client');
Clock.start('client');

Clock.on('update', (timer) => console.log(timer.value));

Methods

Add a timer to the document

Clock.add('client');

Start a timer

Clock.start('client');

Stop a timer

Clock.stop('client');

Reset a timer

Clock.reset('client');

Get a timer's information

console.log(Clock.get('client'));

Remove a timer

Clock.remove('client');

Callbacks

Available callbacks are: 'init', add', 'start', 'stop', 'update', 'reset', 'remove'.
Clock.on('update', (timer) => console.log(timer.value));

License

Free for personal use
0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago