system_assignation/node_modules/single-line-log/test.js

22 lines
396 B
JavaScript
Raw Normal View History

2022-03-24 09:22:39 -04:00
var log = require('./index').stdout;
var i = 0;
setInterval(function() {
i++;
var s = 'line 1 - ' + Math.random();
if (i < 10) s += ' - ' + Math.random();
if (i < 40) s += '\nline 2 - ' + Math.random();
if (i < 30) s += '\nline 3 - ' + Math.random();
if (i < 20) s += '\nline 4 - ' + Math.random();
log(s);
if (i === 50) {
log.clear();
process.exit(0);
}
}, 200);