API/api.medcify.app/node_modules/charm/example/256.js
2022-09-26 11:41:44 +05:30

18 lines
322 B
JavaScript

var charm = require('../')(process);
function exit () {
charm.display('reset');
process.exit();
}
charm.on('^C', exit);
var ix = 0;
var iv = setInterval(function () {
charm.background(ix++).write(' ');
if (ix === 256) {
clearInterval(iv);
charm.write('\n');
exit();
}
}, 10);