stable-timeout

0.0.4 • Public • Published

stable-timeout

Stable setTimeout.

Installation

$ npm install stable-timeout

Example

var StableTimeout = require('stable-timeout');
var timeout = new StableTimeout();
var clearButton = document.querySelector('.button-clear');
 
timeout.set(function() {
  console.log('fired after 10s');
}, 10000);
 
clearButton.addEventListener('click', function(e) {
  // cancel timeout
  timeout.clear();
}, false);

License

MIT

Versions

Current Tags

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

Version History

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

Package Sidebar

Install

npm i stable-timeout

Weekly Downloads

4

Version

0.0.4

License

MIT

Last publish

Collaborators

  • fractal
  • nulltask
  • yocontra