queue work to happen within frames to allow the UI some time to update.
npm install f-sync
var fSync = require('f-sync');
var queue = fSync(options);
queue(function(){
// Some work to be done
});
// cancel queue mid-flight
queue.cancel(); // no more work will happen.
npm run watch-example
then open example/index.html in a browser.