infinite loop in nodejs, easy to use, good performance

npm install infinite-loop
1 downloads in the last day
10 downloads in the last week
22 downloads in the last month


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 ++;

//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;

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