Skip to content

Commit bd7d7a7

Browse files
tylerbrazierjasnell
authored andcommitted
console: name anonymous functions
Ref: #8913 PR-URL: #9047 Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent b0da431 commit bd7d7a7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/console.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,34 +39,34 @@ function Console(stdout, stderr) {
3939
// As of v8 5.0.71.32, the combination of rest param, template string
4040
// and .apply(null, args) benchmarks consistently faster than using
4141
// the spread operator when calling util.format.
42-
Console.prototype.log = function(...args) {
42+
Console.prototype.log = function log(...args) {
4343
this._stdout.write(`${util.format.apply(null, args)}\n`);
4444
};
4545

4646

4747
Console.prototype.info = Console.prototype.log;
4848

4949

50-
Console.prototype.warn = function(...args) {
50+
Console.prototype.warn = function warn(...args) {
5151
this._stderr.write(`${util.format.apply(null, args)}\n`);
5252
};
5353

5454

5555
Console.prototype.error = Console.prototype.warn;
5656

5757

58-
Console.prototype.dir = function(object, options) {
58+
Console.prototype.dir = function dir(object, options) {
5959
options = Object.assign({customInspect: false}, options);
6060
this._stdout.write(`${util.inspect(object, options)}\n`);
6161
};
6262

6363

64-
Console.prototype.time = function(label) {
64+
Console.prototype.time = function time(label) {
6565
this._times.set(label, process.hrtime());
6666
};
6767

6868

69-
Console.prototype.timeEnd = function(label) {
69+
Console.prototype.timeEnd = function timeEnd(label) {
7070
const time = this._times.get(label);
7171
if (!time) {
7272
process.emitWarning(`No such label '${label}' for console.timeEnd()`);
@@ -90,7 +90,7 @@ Console.prototype.trace = function trace(...args) {
9090
};
9191

9292

93-
Console.prototype.assert = function(expression, ...args) {
93+
Console.prototype.assert = function assert(expression, ...args) {
9494
if (!expression) {
9595
require('assert').ok(false, util.format.apply(null, args));
9696
}

0 commit comments

Comments
 (0)