vlad 6f123ff03e 18.07 | 6 rokov pred | |
---|---|---|
.. | ||
node_modules | 6 rokov pred | |
index.js | 6 rokov pred | |
license | 6 rokov pred | |
package.json | 6 rokov pred | |
readme.md | 6 rokov pred |
Log by overwriting the previous output in the terminal.
Useful for rendering progress bars, animations, etc.
$ npm install --save log-update
var logUpdate = require('log-update');
var i = 0;
var frames = ['-', '\\', '|', '/'];
setInterval(function () {
var frame = frames[i++ % frames.length];
logUpdate('\n' + ' ♥♥\n ' + frame + ' unicorns ' + frame + '\n ♥♥');
}, 100);
Log to stdout.
Clear the logged output.
Persist the logged output.
Useful if you want to start a new log session below the current one.
Log to stderr.
Get a logUpdate
method that logs to the specified stream.
MIT © Sindre Sorhus