temporal
Non-blocking, temporal task sequencing. temporal
does NOT use setTimeout
or setInterval
.
Presentations
Getting Started
npm install temporal
Examples
var temporal = require("temporal");
temporal.on("idle", function() {
console.log("Temporal is idle");
});
temporal.delay(500, function() {
console.log("500ms later...");
});
temporal.loop(500, function() {
console.log("Every 500ms...");
this.stop();
this.called;
});
temporal.queue([
{
delay: 500,
task: function() {
}
},
{
delay: 500,
task: function() {
}
}
]);
temporal.queue([
{
delay: 500,
task: function() {
}
},
{
loop: 100,
task: function() {
}
}
]);
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
License
See LICENSE file.