lib/utils.js
function setIntervalContext(fn, ctx, timeout) {
  var id;

  var cancel = function() {
    clearInterval(id);
  };

  id = setInterval(function() { fn(); }, timeout);

  ctx.once('cancel', cancel);
}
function setIntervalContext(fn, ctx, timeout) {
  var id;

  var cancel = function() {
    clearInterval(id);
  };

  id = setInterval(function() { fn(); }, timeout);

  ctx.once('cancel', cancel);
}
function setIntervalContext ( fn , ctx , timeout ) { var id ; var cancel = function ( ) { clearInterval ( id ) ; } ; id = setInterval ( function ( ) { fn ( ) ; } , timeout ) ; ctx . once ( 'cancel' , cancel ) ; }
Set interval with cancel support
Set interval with cancel support