infinite-loop

infinite loop in nodejs, easy to use, good performance

npm install infinite-loop
5 downloads in the last week
26 downloads in the last month

infiniteLoop

infinite loop in nodejs

easy to use:

var InfiniteLoop = require('infinite-loop');

var il = new InfiniteLoop();

//task you want to run infinitely
function addOne(n) {
  n ++;
  console.log(n);
}

//use add to add a task
//first argument should be a function, the rest should be the functions' argument
il.add(addOne, 26);

//use run to invoke the task
il.run();

//the api is chainable
il.add(addOne, 26).run();
npm loves you