log-update
Advanced tools
Comparing version 2.3.0 to 3.0.0
@@ -7,3 +7,3 @@ 'use strict'; | ||
const getWidth = stream => { | ||
const columns = stream.columns; | ||
const {columns} = stream; | ||
@@ -30,3 +30,3 @@ if (!columns) { | ||
const render = function () { | ||
const render = (...args) => { | ||
if (!options.showCursor) { | ||
@@ -36,3 +36,3 @@ cliCursor.hide(); | ||
let out = [].join.call(arguments, ' ') + '\n'; | ||
let out = args.join(' ') + '\n'; | ||
out = wrapAnsi(out, getWidth(stream), { | ||
@@ -39,0 +39,0 @@ trim: false, |
{ | ||
"name": "log-update", | ||
"version": "2.3.0", | ||
"description": "Log by overwriting the previous output in the terminal. Useful for rendering progress bars, animations, etc.", | ||
"license": "MIT", | ||
"repository": "sindresorhus/log-update", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && node test.js" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"log", | ||
"logger", | ||
"logging", | ||
"cli", | ||
"terminal", | ||
"term", | ||
"console", | ||
"shell", | ||
"update", | ||
"refresh", | ||
"overwrite", | ||
"output", | ||
"stdout", | ||
"progress", | ||
"bar", | ||
"animation" | ||
], | ||
"dependencies": { | ||
"ansi-escapes": "^3.0.0", | ||
"cli-cursor": "^2.0.0", | ||
"wrap-ansi": "^3.0.1" | ||
}, | ||
"devDependencies": { | ||
"xo": "*" | ||
} | ||
"name": "log-update", | ||
"version": "3.0.0", | ||
"description": "Log by overwriting the previous output in the terminal. Useful for rendering progress bars, animations, etc.", | ||
"license": "MIT", | ||
"repository": "sindresorhus/log-update", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=6" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"log", | ||
"logger", | ||
"logging", | ||
"cli", | ||
"terminal", | ||
"term", | ||
"console", | ||
"shell", | ||
"update", | ||
"refresh", | ||
"overwrite", | ||
"output", | ||
"stdout", | ||
"progress", | ||
"bar", | ||
"animation" | ||
], | ||
"dependencies": { | ||
"ansi-escapes": "^3.2.0", | ||
"cli-cursor": "^2.1.0", | ||
"wrap-ansi": "^5.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^1.2.1", | ||
"terminal.js": "^1.0.10", | ||
"xo": "^0.24.0" | ||
} | ||
} |
@@ -20,2 +20,3 @@ # log-update [![Build Status](https://travis-ci.org/sindresorhus/log-update.svg?branch=master)](https://travis-ci.org/sindresorhus/log-update) | ||
const logUpdate = require('log-update'); | ||
const frames = ['-', '\\', '|', '/']; | ||
@@ -40,3 +41,3 @@ let i = 0; | ||
### logUpdate(text, ...) | ||
### logUpdate(text…) | ||
@@ -54,3 +55,3 @@ Log to stdout. | ||
### logUpdate.stderr(text, ...) | ||
### logUpdate.stderr(text…) | ||
@@ -57,0 +58,0 @@ Log to stderr. |
93
4876
3
+ Addedansi-regex@4.1.1(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedemoji-regex@7.0.3(transitive)
+ Addedstring-width@3.1.0(transitive)
+ Addedstrip-ansi@5.2.0(transitive)
+ Addedwrap-ansi@5.1.0(transitive)
- Removedansi-regex@3.0.1(transitive)
- Removedstring-width@2.1.1(transitive)
- Removedstrip-ansi@4.0.0(transitive)
- Removedwrap-ansi@3.0.1(transitive)
Updatedansi-escapes@^3.2.0
Updatedcli-cursor@^2.1.0
Updatedwrap-ansi@^5.0.0