'use strict';

var Stopwatch = require('timer-stopwatch');

function Hangman(timeLimit, callback) {
  if (typeof timeLimit === 'function') {
    callback = timeLimit;
    timeLimit = void 0;
  }
  if (!timeLimit) { timeLimit = 60000; }
  var timer = new Stopwatch(timeLimit, {
    refreshRate: Math.floor(timeLimit / 10) || 10
  });
  timer.on('done', callback || function() {
    process.exit(1);
  });
  timer.start();
  return function() {
    timer.reset(timeLimit);
    timer.start();
  };
}

module.exports = Hangman;

@@ -420,23 +420,16 @@
 ;%0A  
-return 
 function
 () %7B
@@ -416,32 +416,42 @@
 rt();%0A  function
+ heartbeat
 () %7B%0A    timer.r
@@ -455,25 +455,16 @@
 r.reset(
-timeLimit
 );%0A    t
@@ -480,16 +480,68 @@
 t();%0A  %7D
+%0A  heartbeat.cancel = timer.stop;%0A  return heartbeat
 ;%0A%7D%0A%0Amod

Add public cancel method