@hoolymama/pomtime

0.0.3 • Public • Published

Pomodoro Timer

Pomodoro timer with work and relax phases

Installation

npm install @hoolymama/pomtime

Usage

var PomodoroTimer = require('@hoolymama/pomtime');

or import PomodoroTimer from '@hoolymama/pomtime'

Create an options object containing the number of work seconds, rest seconds, and callbacks.

opts = {}
opts.workSeconds = 20
opts.restSeconds = 8

opts.onSecondsChange = function(obj){console.log("onSecondsChange"); console.log(obj)}
opts.onWorkEnd = function(obj){console.log("onWorkEnd"); console.log(obj)}
opts.onRestEnd = function(obj){console.log("onRestEnd"); console.log(obj)}
opts.onStopTimer = function(obj){console.log("onStopTimer"); console.log(obj)}

Create a new PomTimer with above options and start it.

var myTimer = new PomodoroTimer(opts)
myTimer.start()
myTimer.stop()

Tests

npm test

Contributing

Readme

Keywords

Package Sidebar

Install

npm i @hoolymama/pomtime

Weekly Downloads

3

Version

0.0.3

License

ISC

Last publish

Collaborators

  • hoolymama