From cfa5c517866f3f0ecdc286ea9c70223460c0083c Mon Sep 17 00:00:00 2001 From: aks- Date: Thu, 22 Oct 2015 00:39:00 +0530 Subject: [PATCH] console: Add common aliases for console methods - add common aliases as per following spec - https://github.com/DeveloperToolsWG/console-object/blob/master/api.md --- lib/console.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/console.js b/lib/console.js index ad3d0af8ce44da..ba880d4e94fe05 100644 --- a/lib/console.js +++ b/lib/console.js @@ -40,6 +40,9 @@ Console.prototype.log = function() { Console.prototype.info = Console.prototype.log; +Console.prototype.debug = Console.prototype.log; + + Console.prototype.warn = function() { this._stderr.write(util.format.apply(this, arguments) + '\n'); }; @@ -48,6 +51,9 @@ Console.prototype.warn = function() { Console.prototype.error = Console.prototype.warn; +Console.prototype.exception = Console.prototype.warn; + + Console.prototype.dir = function(object, options) { this._stdout.write(util.inspect(object, util._extend({ customInspect: false