react-monaco-editor
Version:
Monaco Editor for React
66 lines (36 loc) • 1.21 kB
Markdown
> Log by overwriting the previous output in the terminal.
> Useful for rendering progress bars, animations, etc.

```
$ npm install --save log-update
```
```js
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.
- [speed-test](https://github.com/sindresorhus/speed-test) - Uses this module to render a spinner
MIT © [Sindre Sorhus](http://sindresorhus.com)