stable-interval

0.0.4 • Public • Published

stable-interval

Stable setInterval.

Installation

$ npm install stable-interval

Example

var StableInterval = require('stable-interval');
var interval = new StableInterval();
var clearButton = document.querySelector('.button-clear');
 
interval.set(function() {
  console.log('fires every seconds');
}, 1000);
 
clearButton.addEventListener('click', function(e) {
  // cancel interval
  interval.clear();
}, false);

License

MIT

install

npm i stable-interval

Downloadsweekly downloads

2

version

0.0.4

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
Report a vulnerability