Skip to content

Commit 28283ef

Browse files
BridgeARMylesBorins
authored andcommitted
console: order functions and remove \n\n
This lists all function aliases directly below the declared function. PR-URL: #17707 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 27227cf commit 28283ef

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

lib/console.js

+1-17
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ function write(ignoreErrors, stream, string, errorhandler, groupIndent) {
131131
}
132132
}
133133

134-
135134
Console.prototype.log = function log(...args) {
136135
write(this._ignoreErrors,
137136
this._stdout,
@@ -142,13 +141,9 @@ Console.prototype.log = function log(...args) {
142141
this._stdoutErrorHandler,
143142
this[kGroupIndent]);
144143
};
145-
146-
147144
Console.prototype.debug = Console.prototype.log;
148-
149-
150145
Console.prototype.info = Console.prototype.log;
151-
146+
Console.prototype.dirxml = Console.prototype.log;
152147

153148
Console.prototype.warn = function warn(...args) {
154149
write(this._ignoreErrors,
@@ -157,11 +152,8 @@ Console.prototype.warn = function warn(...args) {
157152
this._stderrErrorHandler,
158153
this[kGroupIndent]);
159154
};
160-
161-
162155
Console.prototype.error = Console.prototype.warn;
163156

164-
165157
Console.prototype.dir = function dir(object, options) {
166158
options = Object.assign({ customInspect: false }, options);
167159
write(this._ignoreErrors,
@@ -171,17 +163,12 @@ Console.prototype.dir = function dir(object, options) {
171163
this[kGroupIndent]);
172164
};
173165

174-
175-
Console.prototype.dirxml = Console.prototype.log;
176-
177-
178166
Console.prototype.time = function time(label = 'default') {
179167
// Coerces everything other than Symbol to a string
180168
label = `${label}`;
181169
this._times.set(label, process.hrtime());
182170
};
183171

184-
185172
Console.prototype.timeEnd = function timeEnd(label = 'default') {
186173
// Coerces everything other than Symbol to a string
187174
label = `${label}`;
@@ -196,7 +183,6 @@ Console.prototype.timeEnd = function timeEnd(label = 'default') {
196183
this._times.delete(label);
197184
};
198185

199-
200186
Console.prototype.trace = function trace(...args) {
201187
const err = {
202188
name: 'Trace',
@@ -206,7 +192,6 @@ Console.prototype.trace = function trace(...args) {
206192
this.error(err.stack);
207193
};
208194

209-
210195
Console.prototype.assert = function assert(expression, ...args) {
211196
if (!expression) {
212197
require('assert').ok(false, util.format.apply(null, args));
@@ -256,7 +241,6 @@ Console.prototype.group = function group(...data) {
256241
}
257242
this[kGroupIndent] += ' ';
258243
};
259-
260244
Console.prototype.groupCollapsed = Console.prototype.group;
261245

262246
Console.prototype.groupEnd = function groupEnd() {

0 commit comments

Comments
 (0)