@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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    2
  • 0.0.2
    3
  • 0.0.1
    2

Package Sidebar

Install

npm i @hoolymama/pomtime

Weekly Downloads

3

Version

0.0.3

License

ISC

Last publish

Collaborators

  • hoolymama