0.0.4 • Published 6 years ago

open-timeout-set v0.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

Open Timeout Set

SetTimeout, but open source and with the callback at the end.

Usage

const timeoutSet = require("open-timeout-set");
const timer0 = timeoutSet(() => {
    console.log("I'm called at the very beginning of the next event loop.");
});
const timer1 = 0 timeoutSet(100, () => {
    console.log("I'm 100 ms later.");
});
const timer2 = 0 timeoutSet(2000, 1, 2, (...args) => {
    console.log("I'm 100 ms later with these arguments:", ...args);
});
clearTimeout(timer0);// unless you're cancelled
clearTimeout(timer1);// unless you're cancelled
clearTimeout(timer2);// unless you're cancelled
0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago