vlad 6f123ff03e 18.07 | 6 سال پیش | |
---|---|---|
.. | ||
node_modules | 6 سال پیش | |
index.js | 6 سال پیش | |
license | 6 سال پیش | |
package.json | 6 سال پیش | |
readme.md | 6 سال پیش |
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