runlater

runlater.js runs code asynchronously at a later time. This library is used specifically for cleanup in mojo.js.

npm install runlater
22 downloads in the last day
241 downloads in the last week
828 downloads in the last month

runlater.js runs code asynchronously at a later time. This library is used specifically for cleanup in mojo.js. Build Status

var runLater = require("runlater")(20);

// called after 1 ms in batches of 20 synchronous methods. 
// I.E: below runs in 2 batches of 20 (40).
for(var i = 40; i--;)
  runLater(function () {

  });
npm loves you