Skip to content

Commit 48eb90b

Browse files
committedJul 17, 2020
Merge branch 'release/v2.0.2'
2 parents d7f1aca + 3726c14 commit 48eb90b

12 files changed

+3822
-4590
lines changed
 

‎.travis.yml

-5
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,23 @@ branches:
33
only:
44
- master
55
- develop
6-
- /^greenkeeper/.*$/
76
- /^feature/.*$/
87
language: node_js
98
node_js:
109
- stable
1110
- 12
12-
- 11
1311
- 10
1412
env:
1513
global:
1614
- CC_TEST_REPORTER_ID=dd40883297d249d8283f121d8613705b46ecd75bdc0787a8fc5ca82048def316
1715
before_install:
1816
- npm i -g npm
19-
- npm install -g greenkeeper-lockfile
2017
install: npm ci --no-optional
2118
before_script:
22-
- greenkeeper-lockfile-update
2319
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
2420
- chmod +x ./cc-test-reporter
2521
- ./cc-test-reporter before-build
2622
after_script:
27-
- greenkeeper-lockfile-upload
2823
- "[ $TRAVIS_NODE_VERSION = stable ] && nyc report --reporter=lcov && ./cc-test-reporter
2924
after-build --debug -t lcov --exit-code $TRAVIS_TEST_RESULT || echo 'Coverage skipped'"
3025
notifications:

‎docs/assets/js/site.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/assets/js/split.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/index.html

+73-73
Large diffs are not rendered by default.

‎index.js

+39-39
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,42 @@ function matrix(sOut, sErr) {
1616
debug: {
1717
level: 5,
1818
stream: sOut,
19-
format: (pfix, msg) => `${pfix}${chalk.dim(msg)}`
19+
format: (pfix, message) => `${pfix}${chalk.dim(message)}`
2020
},
2121
info: {
2222
level: 4,
2323
stream: sOut,
24-
format: (pfix, msg) => `${pfix}${msg}`
24+
format: (pfix, message) => `${pfix}${message}`
2525
},
2626
log: {
2727
level: 3,
2828
stream: sOut,
29-
format: (pfix, msg) => `${pfix}${msg}`
29+
format: (pfix, message) => `${pfix}${message}`
3030
},
3131
warn: {
3232
level: 2,
3333
stream: sErr,
34-
format: (pfix, msg) => `${pfix}${chalk.yellow(msg)}`
34+
format: (pfix, message) => `${pfix}${chalk.yellow(message)}`
3535
},
3636
error: {
3737
level: 1,
3838
stream: sErr,
39-
format: (pfix, msg) => `${pfix}${chalk.red(`ERROR: ${msg}`)}`
39+
format: (pfix, message) => `${pfix}${chalk.red(`ERROR: ${message}`)}`
4040
},
4141
critical: {
4242
level: 0,
4343
stream: sErr,
44-
format: (pfix, msg) => `${pfix}${chalk.bold.red(`CRITICAL: ${msg}`)}`
44+
format: (pfix, message) => `${pfix}${chalk.bold.red(`CRITICAL: ${message}`)}`
4545
},
4646
panic: {
4747
level: 0,
4848
stream: sErr,
49-
format: (pfix, msg) => `${pfix}${chalk.bold.red(`PANIC: ${msg}`)}`
49+
format: (pfix, message) => `${pfix}${chalk.bold.red(`PANIC: ${message}`)}`
5050
},
5151
emergency: {
5252
level: 0,
5353
stream: sErr,
54-
format: (pfix, msg) => `${pfix}${chalk.bold.red(`EMERGENCY: ${msg}`)}`
54+
format: (pfix, message) => `${pfix}${chalk.bold.red(`EMERGENCY: ${message}`)}`
5555
}
5656
};
5757
}
@@ -136,89 +136,89 @@ class Verbosity extends Console {
136136
return this.threshold >= level;
137137
}
138138

139-
route(level, msg, ...a) {
140-
msg = a.length > 0 ? format(msg, ...a) : msg;
139+
route(level, message, ...a) {
140+
message = a.length > 0 ? format(message, ...a) : message;
141141

142142
if (this.willEmit) {
143-
this.emitter.emit(level, msg);
143+
this.emitter.emit(level, message);
144144
}
145145

146146
if (this.threshold >= this.matrix[level].level) {
147147
const pfix = `${this.timeFormatter()}${this.prefixFormatter()}`;
148-
this.matrix[level].stream.write(`${this.matrix[level].format(pfix, msg)}\n`);
148+
this.matrix[level].stream.write(`${this.matrix[level].format(pfix, message)}\n`);
149149
}
150150
}
151151

152-
debug(msg, ...args) {
153-
this.route('debug', msg, ...args);
152+
debug(message, ...args) {
153+
this.route('debug', message, ...args);
154154
}
155155

156-
info(msg, ...args) {
157-
this.route('info', msg, ...args);
156+
info(message, ...args) {
157+
this.route('info', message, ...args);
158158
}
159159

160-
log(msg, ...args) {
161-
this.route('log', msg, ...args);
160+
log(message, ...args) {
161+
this.route('log', message, ...args);
162162
}
163163

164-
warn(msg, ...args) {
165-
this.route('warn', msg, ...args);
164+
warn(message, ...args) {
165+
this.route('warn', message, ...args);
166166
}
167167

168-
error(msg, ...args) {
169-
this.route('error', msg, ...args);
168+
error(message, ...args) {
169+
this.route('error', message, ...args);
170170
}
171171

172-
critical(msg, ...args) {
173-
this.route('critical', msg, ...args);
172+
critical(message, ...args) {
173+
this.route('critical', message, ...args);
174174
}
175175

176-
panic(msg, ...args) {
177-
this.route('panic', msg, ...args);
176+
panic(message, ...args) {
177+
this.route('panic', message, ...args);
178178
}
179179

180-
emergency(msg, ...args) {
181-
this.route('emergency', msg, ...args);
180+
emergency(message, ...args) {
181+
this.route('emergency', message, ...args);
182182
}
183183

184-
dir(obj, options = {}) {
184+
dir(object, options = {}) {
185185
const {
186186
depth = 0,
187187
colors = termNG.color.basic
188188
} = options;
189189
options.depth = depth;
190190
options.colors = colors;
191191

192-
this._stdout.write(format(inspect(obj, options)));
192+
this._stdout.write(format(inspect(object, options)));
193193
}
194194

195-
pretty(obj, depth = 0, color = true) {
196-
this._stdout.write(format('Content: %s\n', inspect(obj, {
195+
pretty(object, depth = 0, color = true) {
196+
this._stdout.write(format('Content: %s\n', inspect(object, {
197197
depth,
198198
colors: color && termNG.color.basic
199199
}).slice(0, -1).replace(/^{/, 'Object\n ').replace(/^\[/, 'Array\n ').replace(/^(\w+) {/, '$1').replace(/(\w+):/g, '$1 ▸').replace(/,\n/g, '\n')));
200200
}
201201

202-
yargs(obj, color = true) {
202+
yargs(object, color = true) {
203203
const parsed = {};
204-
Object.keys(obj).forEach(key_ => {
205-
const val = obj[key_];
204+
Object.keys(object).forEach(key_ => {
205+
const value = object[key_];
206206

207207
switch (key_) {
208208
case '_':
209-
if (val.length > 0) {
210-
parsed.arguments = val.join(' ');
209+
if (value.length > 0) {
210+
parsed.arguments = value.join(' ');
211211
}
212212

213213
break;
214214

215215
case '$0':
216-
parsed.self = val;
216+
parsed.self = value;
217217
break;
218218

219219
default:
220220
if (key_.length > 1) {
221-
parsed[key_] = val;
221+
parsed[key_] = value;
222222
}
223223

224224
}

‎index.mjs

+39-39
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,42 @@ function matrix(sOut, sErr) {
1010
debug: {
1111
level: 5,
1212
stream: sOut,
13-
format: (pfix, msg) => `${pfix}${chalk.dim(msg)}`
13+
format: (pfix, message) => `${pfix}${chalk.dim(message)}`
1414
},
1515
info: {
1616
level: 4,
1717
stream: sOut,
18-
format: (pfix, msg) => `${pfix}${msg}`
18+
format: (pfix, message) => `${pfix}${message}`
1919
},
2020
log: {
2121
level: 3,
2222
stream: sOut,
23-
format: (pfix, msg) => `${pfix}${msg}`
23+
format: (pfix, message) => `${pfix}${message}`
2424
},
2525
warn: {
2626
level: 2,
2727
stream: sErr,
28-
format: (pfix, msg) => `${pfix}${chalk.yellow(msg)}`
28+
format: (pfix, message) => `${pfix}${chalk.yellow(message)}`
2929
},
3030
error: {
3131
level: 1,
3232
stream: sErr,
33-
format: (pfix, msg) => `${pfix}${chalk.red(`ERROR: ${msg}`)}`
33+
format: (pfix, message) => `${pfix}${chalk.red(`ERROR: ${message}`)}`
3434
},
3535
critical: {
3636
level: 0,
3737
stream: sErr,
38-
format: (pfix, msg) => `${pfix}${chalk.bold.red(`CRITICAL: ${msg}`)}`
38+
format: (pfix, message) => `${pfix}${chalk.bold.red(`CRITICAL: ${message}`)}`
3939
},
4040
panic: {
4141
level: 0,
4242
stream: sErr,
43-
format: (pfix, msg) => `${pfix}${chalk.bold.red(`PANIC: ${msg}`)}`
43+
format: (pfix, message) => `${pfix}${chalk.bold.red(`PANIC: ${message}`)}`
4444
},
4545
emergency: {
4646
level: 0,
4747
stream: sErr,
48-
format: (pfix, msg) => `${pfix}${chalk.bold.red(`EMERGENCY: ${msg}`)}`
48+
format: (pfix, message) => `${pfix}${chalk.bold.red(`EMERGENCY: ${message}`)}`
4949
}
5050
};
5151
}
@@ -130,89 +130,89 @@ class Verbosity extends Console {
130130
return this.threshold >= level;
131131
}
132132

133-
route(level, msg, ...a) {
134-
msg = a.length > 0 ? format(msg, ...a) : msg;
133+
route(level, message, ...a) {
134+
message = a.length > 0 ? format(message, ...a) : message;
135135

136136
if (this.willEmit) {
137-
this.emitter.emit(level, msg);
137+
this.emitter.emit(level, message);
138138
}
139139

140140
if (this.threshold >= this.matrix[level].level) {
141141
const pfix = `${this.timeFormatter()}${this.prefixFormatter()}`;
142-
this.matrix[level].stream.write(`${this.matrix[level].format(pfix, msg)}\n`);
142+
this.matrix[level].stream.write(`${this.matrix[level].format(pfix, message)}\n`);
143143
}
144144
}
145145

146-
debug(msg, ...args) {
147-
this.route('debug', msg, ...args);
146+
debug(message, ...args) {
147+
this.route('debug', message, ...args);
148148
}
149149

150-
info(msg, ...args) {
151-
this.route('info', msg, ...args);
150+
info(message, ...args) {
151+
this.route('info', message, ...args);
152152
}
153153

154-
log(msg, ...args) {
155-
this.route('log', msg, ...args);
154+
log(message, ...args) {
155+
this.route('log', message, ...args);
156156
}
157157

158-
warn(msg, ...args) {
159-
this.route('warn', msg, ...args);
158+
warn(message, ...args) {
159+
this.route('warn', message, ...args);
160160
}
161161

162-
error(msg, ...args) {
163-
this.route('error', msg, ...args);
162+
error(message, ...args) {
163+
this.route('error', message, ...args);
164164
}
165165

166-
critical(msg, ...args) {
167-
this.route('critical', msg, ...args);
166+
critical(message, ...args) {
167+
this.route('critical', message, ...args);
168168
}
169169

170-
panic(msg, ...args) {
171-
this.route('panic', msg, ...args);
170+
panic(message, ...args) {
171+
this.route('panic', message, ...args);
172172
}
173173

174-
emergency(msg, ...args) {
175-
this.route('emergency', msg, ...args);
174+
emergency(message, ...args) {
175+
this.route('emergency', message, ...args);
176176
}
177177

178-
dir(obj, options = {}) {
178+
dir(object, options = {}) {
179179
const {
180180
depth = 0,
181181
colors = termNG.color.basic
182182
} = options;
183183
options.depth = depth;
184184
options.colors = colors;
185185

186-
this._stdout.write(format(inspect(obj, options)));
186+
this._stdout.write(format(inspect(object, options)));
187187
}
188188

189-
pretty(obj, depth = 0, color = true) {
190-
this._stdout.write(format('Content: %s\n', inspect(obj, {
189+
pretty(object, depth = 0, color = true) {
190+
this._stdout.write(format('Content: %s\n', inspect(object, {
191191
depth,
192192
colors: color && termNG.color.basic
193193
}).slice(0, -1).replace(/^{/, 'Object\n ').replace(/^\[/, 'Array\n ').replace(/^(\w+) {/, '$1').replace(/(\w+):/g, '$1 ▸').replace(/,\n/g, '\n')));
194194
}
195195

196-
yargs(obj, color = true) {
196+
yargs(object, color = true) {
197197
const parsed = {};
198-
Object.keys(obj).forEach(key_ => {
199-
const val = obj[key_];
198+
Object.keys(object).forEach(key_ => {
199+
const value = object[key_];
200200

201201
switch (key_) {
202202
case '_':
203-
if (val.length > 0) {
204-
parsed.arguments = val.join(' ');
203+
if (value.length > 0) {
204+
parsed.arguments = value.join(' ');
205205
}
206206

207207
break;
208208

209209
case '$0':
210-
parsed.self = val;
210+
parsed.self = value;
211211
break;
212212

213213
default:
214214
if (key_.length > 1) {
215-
parsed[key_] = val;
215+
parsed[key_] = value;
216216
}
217217

218218
}

‎package-lock.json

+3,592-4,351
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+14-17
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "verbosity",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Verbose logging features for ttys or any writable stream.",
55
"main": "index.js",
66
"module": "index.mjs",
@@ -43,28 +43,28 @@
4343
},
4444
"homepage": "https://github.com/thebespokepixel/verbosity#readme",
4545
"dependencies": {
46-
"@thebespokepixel/meta": "^2.0.2",
47-
"@thebespokepixel/time": "^1.0.1",
48-
"chalk": "^3.0.0",
46+
"@thebespokepixel/meta": "^2.0.4",
47+
"@thebespokepixel/time": "^1.0.2",
48+
"chalk": "^4.1.0",
4949
"sparkles": "^1.0.1",
50-
"term-ng": "^2.0.1"
50+
"term-ng": "^2.0.2"
5151
},
5252
"devDependencies": {
5353
"@ava/babel": "^1.0.1",
54-
"@babel/core": "^7.8.4",
55-
"@babel/preset-env": "^7.8.4",
56-
"ava": "^3.3.0",
57-
"documentation-theme-bespoke": "^1.1.3",
54+
"@babel/core": "^7.10.5",
55+
"@babel/preset-env": "^7.10.4",
56+
"ava": "^3.10.1",
57+
"documentation-theme-bespoke": "^1.1.6",
5858
"gulp": "^4.0.2",
5959
"gulp-better-rollup": "^4.0.1",
6060
"gulp-rename": "^2.0.0",
6161
"gulp-strip-comments": "^2.5.2",
62-
"nyc": "^15.0.0",
63-
"rollup": "^1.31.1",
64-
"rollup-plugin-babel": "^4.3.3",
62+
"nyc": "^15.1.0",
63+
"rollup": "^2.21.0",
64+
"rollup-plugin-babel": "^4.4.0",
6565
"rollup-plugin-commonjs": "^10.1.0",
6666
"rollup-plugin-node-resolve": "^5.2.0",
67-
"xo": "^0.26.1"
67+
"xo": "^0.32.1"
6868
},
6969
"xo": {
7070
"semicolon": false,
@@ -109,10 +109,7 @@
109109
],
110110
"Development Status": [
111111
[
112-
"greenkeeper",
113-
"travis-com-dev"
114-
],
115-
[
112+
"travis-com-dev",
116113
"david-dev",
117114
"david-devdeps-dev"
118115
],

‎readme.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
##### Development Status
1111

12-
[![Greenkeeper](https://badges.greenkeeper.io/thebespokepixel/verbosity.svg)](https://greenkeeper.io/ "Greenkeeper") [![Travis](https://img.shields.io/travis/com/thebespokepixel/verbosity/develop?logo=travis)](https://travis-ci.com/thebespokepixel/verbosity "Travis")
13-
[![David](https://david-dm.org/thebespokepixel/verbosity/develop/status.svg)](https://david-dm.org/thebespokepixel/verbosity/develop "David") [![David-developer](https://david-dm.org/thebespokepixel/verbosity/develop/dev-status.svg)](https://david-dm.org/thebespokepixel/verbosity/develop?type=dev "David-developer")
12+
[![Travis](https://img.shields.io/travis/com/thebespokepixel/verbosity/develop?logo=travis)](https://travis-ci.com/thebespokepixel/verbosity "Travis") [![David](https://david-dm.org/thebespokepixel/verbosity/develop/status.svg)](https://david-dm.org/thebespokepixel/verbosity/develop "David") [![David-developer](https://david-dm.org/thebespokepixel/verbosity/develop/dev-status.svg)](https://david-dm.org/thebespokepixel/verbosity/develop?type=dev "David-developer")
1413
[![Snyk](https://snyk.io/test/github/thebespokepixel/verbosity/badge.svg)](https://snyk.io/test/github/thebespokepixel/verbosity "Snyk") [![Code-climate](https://api.codeclimate.com/v1/badges/374a4343fca92868720c/maintainability)](https://codeclimate.com/github/thebespokepixel/verbosity/maintainability "Code-climate") [![Coverage](https://api.codeclimate.com/v1/badges/374a4343fca92868720c/test_coverage)](https://codeclimate.com/github/thebespokepixel/verbosity/test_coverage "Coverage")
1514

1615
##### Documentation/Help

‎src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
╰───────────┴────────────────────────────────────────────────────────────────── */
44

55
import meta from '@thebespokepixel/meta'
6-
import Verbosity from './lib/verbosity.class'
6+
import Verbosity from './lib/verbosity'
77

88
const metadata = meta(__dirname)
99

‎src/lib/matrix.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ export default function matrix(sOut, sErr) {
1717
* Format the debug message.
1818
* @private
1919
* @param {String} pfix Message prefix.
20-
* @param {String} msg The message body.
20+
* @param {String} message The message body.
2121
* @return {Sring} The formatted mesage.
2222
*/
23-
format: (pfix, msg) => `${pfix}${chalk.dim(msg)}`
23+
format: (pfix, message) => `${pfix}${chalk.dim(message)}`
2424
},
2525
info: {
2626
level: 4,
@@ -29,10 +29,10 @@ export default function matrix(sOut, sErr) {
2929
* Format the info message.
3030
* @private
3131
* @param {String} pfix Message prefix.
32-
* @param {String} msg The message body.
32+
* @param {String} message The message body.
3333
* @return {Sring} The formatted mesage.
3434
*/
35-
format: (pfix, msg) => `${pfix}${msg}`
35+
format: (pfix, message) => `${pfix}${message}`
3636
},
3737
log: {
3838
level: 3,
@@ -41,10 +41,10 @@ export default function matrix(sOut, sErr) {
4141
* Format the log message.
4242
* @private
4343
* @param {String} pfix Message prefix.
44-
* @param {String} msg The message body.
44+
* @param {String} message The message body.
4545
* @return {Sring} The formatted mesage.
4646
*/
47-
format: (pfix, msg) => `${pfix}${msg}`
47+
format: (pfix, message) => `${pfix}${message}`
4848
},
4949
warn: {
5050
level: 2,
@@ -53,10 +53,10 @@ export default function matrix(sOut, sErr) {
5353
* Format the warn message.
5454
* @private
5555
* @param {String} pfix Message prefix.
56-
* @param {String} msg The message body.
56+
* @param {String} message The message body.
5757
* @return {Sring} The formatted mesage.
5858
*/
59-
format: (pfix, msg) => `${pfix}${chalk.yellow(msg)}`
59+
format: (pfix, message) => `${pfix}${chalk.yellow(message)}`
6060
},
6161
error: {
6262
level: 1,
@@ -65,10 +65,10 @@ export default function matrix(sOut, sErr) {
6565
* Format the error message.
6666
* @private
6767
* @param {String} pfix Message prefix.
68-
* @param {String} msg The message body.
68+
* @param {String} message The message body.
6969
* @return {Sring} The formatted mesage.
7070
*/
71-
format: (pfix, msg) => `${pfix}${chalk.red(`ERROR: ${msg}`)}`
71+
format: (pfix, message) => `${pfix}${chalk.red(`ERROR: ${message}`)}`
7272
},
7373
critical: {
7474
level: 0,
@@ -77,10 +77,10 @@ export default function matrix(sOut, sErr) {
7777
* Format the critical message.
7878
* @private
7979
* @param {String} pfix Message prefix.
80-
* @param {String} msg The message body.
80+
* @param {String} message The message body.
8181
* @return {Sring} The formatted mesage.
8282
*/
83-
format: (pfix, msg) => `${pfix}${chalk.bold.red(`CRITICAL: ${msg}`)}`
83+
format: (pfix, message) => `${pfix}${chalk.bold.red(`CRITICAL: ${message}`)}`
8484
},
8585
panic: {
8686
level: 0,
@@ -89,10 +89,10 @@ export default function matrix(sOut, sErr) {
8989
* Format the panic message.
9090
* @private
9191
* @param {String} pfix Message prefix.
92-
* @param {String} msg The message body.
92+
* @param {String} message The message body.
9393
* @return {Sring} The formatted mesage.
9494
*/
95-
format: (pfix, msg) => `${pfix}${chalk.bold.red(`PANIC: ${msg}`)}`
95+
format: (pfix, message) => `${pfix}${chalk.bold.red(`PANIC: ${message}`)}`
9696
},
9797
emergency: {
9898
level: 0,
@@ -101,10 +101,10 @@ export default function matrix(sOut, sErr) {
101101
* Format the emergency message.
102102
* @private
103103
* @param {String} pfix Message prefix.
104-
* @param {String} msg The message body.
104+
* @param {String} message The message body.
105105
* @return {Sring} The formatted mesage.
106106
*/
107-
format: (pfix, msg) => `${pfix}${chalk.bold.red(`EMERGENCY: ${msg}`)}`
107+
format: (pfix, message) => `${pfix}${chalk.bold.red(`EMERGENCY: ${message}`)}`
108108
}
109109
}
110110
}

‎src/lib/verbosity.class.js ‎src/lib/verbosity.js

+44-44
Original file line numberDiff line numberDiff line change
@@ -118,114 +118,114 @@ export default class Verbosity extends Console {
118118
* Route message and emit if required.
119119
* @private
120120
* @param {Number} level Source logging level
121-
* @param {String} msg Message to log
121+
* @param {String} message Message to log
122122
* @param {...String} a Additional arguments to log
123123
*/
124-
route(level, msg, ...a) {
125-
msg = (a.length > 0) ? format(msg, ...a) : msg
124+
route(level, message, ...a) {
125+
message = (a.length > 0) ? format(message, ...a) : message
126126
if (this.willEmit) {
127-
this.emitter.emit(level, msg)
127+
this.emitter.emit(level, message)
128128
}
129129

130130
if (this.threshold >= this.matrix[level].level) {
131131
const pfix = `${this.timeFormatter()}${this.prefixFormatter()}`
132-
this.matrix[level].stream.write(`${this.matrix[level].format(pfix, msg)}\n`)
132+
this.matrix[level].stream.write(`${this.matrix[level].format(pfix, message)}\n`)
133133
}
134134
}
135135

136136
/**
137137
* Log a debug message. (Level 5)
138-
* @param {String} msg The debug message to log.
138+
* @param {String} message The debug message to log.
139139
* @param {...String} args Additional arguments to log.
140140
*/
141141

142142
/**
143143
* [debug description]
144-
* @param {[type]} msg [description]
144+
* @param {[type]} message [description]
145145
* @param {...[type]} args [description]
146146
*/
147-
debug(msg, ...args) {
148-
this.route('debug', msg, ...args)
147+
debug(message, ...args) {
148+
this.route('debug', message, ...args)
149149
}
150150

151151
/**
152152
* Log an info message. (Level 4)
153-
* @param {String} msg The info message to log.
153+
* @param {String} message The info message to log.
154154
* @param {...String} args Additional arguments to log.
155155
*/
156-
info(msg, ...args) {
157-
this.route('info', msg, ...args)
156+
info(message, ...args) {
157+
this.route('info', message, ...args)
158158
}
159159

160160
/**
161161
* Log a normal message. (Level 3)
162-
* @param {String} msg The normal message to log.
162+
* @param {String} message The normal message to log.
163163
* @param {...String} args Additional arguments to log.
164164
*/
165-
log(msg, ...args) {
166-
this.route('log', msg, ...args)
165+
log(message, ...args) {
166+
this.route('log', message, ...args)
167167
}
168168

169169
/**
170170
* Log a warning message. (Level 2)
171-
* @param {String} msg The warning message to log.
171+
* @param {String} message The warning message to log.
172172
* @param {...String} args Additional arguments to log.
173173
*/
174-
warn(msg, ...args) {
175-
this.route('warn', msg, ...args)
174+
warn(message, ...args) {
175+
this.route('warn', message, ...args)
176176
}
177177

178178
/**
179179
* Log an error message. (Level 1)
180-
* @param {String} msg The error message to log.
180+
* @param {String} message The error message to log.
181181
* @param {...String} args Additional arguments to log.
182182
*/
183-
error(msg, ...args) {
184-
this.route('error', msg, ...args)
183+
error(message, ...args) {
184+
this.route('error', message, ...args)
185185
}
186186

187187
/**
188188
* Log a critical error message, if something breaks. (Level 1)
189-
* @param {String} msg The critical error message to log.
189+
* @param {String} message The critical error message to log.
190190
* @param {...String} args Additional arguments to log.
191191
*/
192-
critical(msg, ...args) {
193-
this.route('critical', msg, ...args)
192+
critical(message, ...args) {
193+
this.route('critical', message, ...args)
194194
}
195195

196196
/**
197197
* Log a panic error message if something unexpected happens. (Level 1)
198-
* @param {String} msg The panic message to log.
198+
* @param {String} message The panic message to log.
199199
* @param {...String} args Additional arguments to log.
200200
*/
201-
panic(msg, ...args) {
202-
this.route('panic', msg, ...args)
201+
panic(message, ...args) {
202+
this.route('panic', message, ...args)
203203
}
204204

205205
/**
206206
* Log a emergency message, for when something needs emergency attention. (Level 1)
207-
* @param {String} msg The debug message to log.
207+
* @param {String} message The debug message to log.
208208
* @param {...String} args Additional arguments to log.
209209
*/
210-
emergency(msg, ...args) {
211-
this.route('emergency', msg, ...args)
210+
emergency(message, ...args) {
211+
this.route('emergency', message, ...args)
212212
}
213213

214214
/**
215215
* As console.dir, but defaults to colour (if appropriate) and zero depth.
216-
* @param {Object} obj The Object to print.
216+
* @param {Object} object The Object to print.
217217
* @param {Object} options As console.dir options object.
218218
*/
219-
dir(obj, options = {}) {
219+
dir(object, options = {}) {
220220
const {depth = 0, colors = termNG.color.basic} = options
221221
options.depth = depth
222222
options.colors = colors
223-
this._stdout.write(format(inspect(obj, options)))
223+
this._stdout.write(format(inspect(object, options)))
224224
}
225225

226226
/**
227227
* Pretty prints object, similar to OS X's plutil -p. Defaults to zero depth.
228-
* @param {Object} obj The Object to print.
228+
* @param {Object} object The Object to print.
229229
* @param {Number} depth How many object levels to print.
230230
* @param {Boolean} color Print output in color, if supported.
231231
* @example
@@ -242,8 +242,8 @@ export default class Verbosity extends Console {
242242
* canWrite ▸ [Function]
243243
* ...
244244
*/
245-
pretty(obj, depth = 0, color = true) {
246-
this._stdout.write(format('Content: %s\n', inspect(obj, {
245+
pretty(object, depth = 0, color = true) {
246+
this._stdout.write(format('Content: %s\n', inspect(object, {
247247
depth,
248248
colors: color && termNG.color.basic
249249
})
@@ -260,7 +260,7 @@ export default class Verbosity extends Console {
260260
* Helper function for pretty printing a summary of the current 'yargs' options.
261261
*
262262
* Only prints 'long options', `._` as 'arguments' and `$0` as 'self'.
263-
* @param {Object} obj The Yargs argv object to print.
263+
* @param {Object} object The Yargs argv object to print.
264264
* @param {Boolean} color Print output in color, if supported.
265265
* @example
266266
* console.yargs(yargs)
@@ -274,24 +274,24 @@ export default class Verbosity extends Console {
274274
* ...
275275
* self ▸ '/usr/local/bin/truwrap'
276276
*/
277-
yargs(obj, color = true) {
277+
yargs(object, color = true) {
278278
const parsed = {}
279279

280-
Object.keys(obj).forEach(key_ => {
281-
const val = obj[key_]
280+
Object.keys(object).forEach(key_ => {
281+
const value = object[key_]
282282
switch (key_) {
283283
case '_':
284-
if (val.length > 0) {
285-
parsed.arguments = val.join(' ')
284+
if (value.length > 0) {
285+
parsed.arguments = value.join(' ')
286286
}
287287

288288
break
289289
case '$0':
290-
parsed.self = val
290+
parsed.self = value
291291
break
292292
default:
293293
if (key_.length > 1) {
294-
parsed[key_] = val
294+
parsed[key_] = value
295295
}
296296
}
297297
})

0 commit comments

Comments
 (0)
Please sign in to comment.