npm.io
0.0.12 • Published 12 years ago

runlater

Licence
BSD-2-Clause
Version
0.0.12
Deps
1
Vulns
0
Weekly
0

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 () {
    
  });