stable-interval
v0.0.4
Published
Stable `setInterval`.
Downloads
8
Readme
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