libreccm-legacy/trunk-images/node_modules/log-update
baka a212bb7b37 [3056] Adds Plugin to add Images from the system in tinymce. Now with files...
git-svn-id: https://svn.libreccm.org/ccm/trunk@5722 8810af33-2d31-482b-a856-94f89814c4df
2018-11-03 23:44:15 +00:00
..
index.js [3056] Adds Plugin to add Images from the system in tinymce. Now with files... 2018-11-03 23:44:15 +00:00
license [3056] Adds Plugin to add Images from the system in tinymce. Now with files... 2018-11-03 23:44:15 +00:00
package.json [3056] Adds Plugin to add Images from the system in tinymce. Now with files... 2018-11-03 23:44:15 +00:00
readme.md [3056] Adds Plugin to add Images from the system in tinymce. Now with files... 2018-11-03 23:44:15 +00:00

readme.md

log-update Build Status

Log by overwriting the previous output in the terminal.
Useful for rendering progress bars, animations, etc.

Install

$ npm install --save log-update

Usage

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);

API

logUpdate(text, ...)

Log to stdout.

logUpdate.clear()

Clear the logged output.

logUpdate.done()

Persist the logged output.
Useful if you want to start a new log session below the current one.

logUpdate.stderr(text, ...)

Log to stderr.

logUpdate.stderr.clear()

logUpdate.stderr.done()

logUpdate.create(stream)

Get a logUpdate method that logs to the specified stream.

Examples

  • speed-test - Uses this module to render a spinner

License

MIT © Sindre Sorhus