cs142/project2/node_modules/cli/examples/progress.js

11 lines
223 B
JavaScript
Raw Normal View History

2020-08-01 22:26:11 +00:00
#!/usr/bin/env node
var cli = require('cli');
var i = 0, interval = setInterval(function () {
cli.progress(++i / 100);
if (i === 100) {
clearInterval(interval);
cli.ok('Finished!');
}
}, 50);