summaryrefslogtreecommitdiff
path: root/lib/console.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2017-12-16 01:36:23 -0200
committerRuben Bridgewater <ruben@bridgewater.de>2017-12-20 01:33:50 -0300
commit5b4d5321ee6939044b52aa72de947911b0a8ec00 (patch)
treec11005b2ce96abc7b4ea3f978bbcbab116643a5b /lib/console.js
parent0eab49523d75235cbd14047da5b74467596ae590 (diff)
downloadnode-new-5b4d5321ee6939044b52aa72de947911b0a8ec00.tar.gz
console: order functions and remove \n\n
This lists all function aliases directly below the declared function. PR-URL: https://github.com/nodejs/node/pull/17707 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/console.js')
-rw-r--r--lib/console.js18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/console.js b/lib/console.js
index ae268d8f84..cbaef07404 100644
--- a/lib/console.js
+++ b/lib/console.js
@@ -131,7 +131,6 @@ function write(ignoreErrors, stream, string, errorhandler, groupIndent) {
}
}
-
Console.prototype.log = function log(...args) {
write(this._ignoreErrors,
this._stdout,
@@ -142,13 +141,9 @@ Console.prototype.log = function log(...args) {
this._stdoutErrorHandler,
this[kGroupIndent]);
};
-
-
Console.prototype.debug = Console.prototype.log;
-
-
Console.prototype.info = Console.prototype.log;
-
+Console.prototype.dirxml = Console.prototype.log;
Console.prototype.warn = function warn(...args) {
write(this._ignoreErrors,
@@ -157,11 +152,8 @@ Console.prototype.warn = function warn(...args) {
this._stderrErrorHandler,
this[kGroupIndent]);
};
-
-
Console.prototype.error = Console.prototype.warn;
-
Console.prototype.dir = function dir(object, options) {
options = Object.assign({ customInspect: false }, options);
write(this._ignoreErrors,
@@ -171,17 +163,12 @@ Console.prototype.dir = function dir(object, options) {
this[kGroupIndent]);
};
-
-Console.prototype.dirxml = Console.prototype.log;
-
-
Console.prototype.time = function time(label = 'default') {
// Coerces everything other than Symbol to a string
label = `${label}`;
this._times.set(label, process.hrtime());
};
-
Console.prototype.timeEnd = function timeEnd(label = 'default') {
// Coerces everything other than Symbol to a string
label = `${label}`;
@@ -196,7 +183,6 @@ Console.prototype.timeEnd = function timeEnd(label = 'default') {
this._times.delete(label);
};
-
Console.prototype.trace = function trace(...args) {
const err = {
name: 'Trace',
@@ -206,7 +192,6 @@ Console.prototype.trace = function trace(...args) {
this.error(err.stack);
};
-
Console.prototype.assert = function assert(expression, ...args) {
if (!expression) {
require('assert').ok(false, util.format.apply(null, args));
@@ -256,7 +241,6 @@ Console.prototype.group = function group(...data) {
}
this[kGroupIndent] += ' ';
};
-
Console.prototype.groupCollapsed = Console.prototype.group;
Console.prototype.groupEnd = function groupEnd() {