async-chainable-progress
Version:
Plugin for async-chainable that adds progress bars, spinners and other widgets
20 lines (18 loc) • 343 B
JavaScript
var async = require('async-chainable');
var asyncProgress = require('../');
async()
.use(asyncProgress)
.progress(0)
.then(function(next) {
setTimeout(next, 1000);
})
.progress(50)
.then(function(next) {
setTimeout(next, 2000);
})
.progress(100)
.then(function(next) {
setTimeout(next, 1000);
})
.progressComplete()
.end();