Skip to content

Commit cfa5c51

Browse files
committed
console: Add common aliases for console methods
- add common aliases as per following spec - https://github.com/DeveloperToolsWG/console-object/blob/master/api.md
1 parent 8d9069a commit cfa5c51

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/console.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ Console.prototype.log = function() {
4040
Console.prototype.info = Console.prototype.log;
4141

4242

43+
Console.prototype.debug = Console.prototype.log;
44+
45+
4346
Console.prototype.warn = function() {
4447
this._stderr.write(util.format.apply(this, arguments) + '\n');
4548
};
@@ -48,6 +51,9 @@ Console.prototype.warn = function() {
4851
Console.prototype.error = Console.prototype.warn;
4952

5053

54+
Console.prototype.exception = Console.prototype.warn;
55+
56+
5157
Console.prototype.dir = function(object, options) {
5258
this._stdout.write(util.inspect(object, util._extend({
5359
customInspect: false

0 commit comments

Comments
 (0)