@@ -39,34 +39,34 @@ function Console(stdout, stderr) {
39
39
// As of v8 5.0.71.32, the combination of rest param, template string
40
40
// and .apply(null, args) benchmarks consistently faster than using
41
41
// the spread operator when calling util.format.
42
- Console . prototype . log = function ( ...args ) {
42
+ Console . prototype . log = function log ( ...args ) {
43
43
this . _stdout . write ( `${ util . format . apply ( null , args ) } \n` ) ;
44
44
} ;
45
45
46
46
47
47
Console . prototype . info = Console . prototype . log ;
48
48
49
49
50
- Console . prototype . warn = function ( ...args ) {
50
+ Console . prototype . warn = function warn ( ...args ) {
51
51
this . _stderr . write ( `${ util . format . apply ( null , args ) } \n` ) ;
52
52
} ;
53
53
54
54
55
55
Console . prototype . error = Console . prototype . warn ;
56
56
57
57
58
- Console . prototype . dir = function ( object , options ) {
58
+ Console . prototype . dir = function dir ( object , options ) {
59
59
options = Object . assign ( { customInspect : false } , options ) ;
60
60
this . _stdout . write ( `${ util . inspect ( object , options ) } \n` ) ;
61
61
} ;
62
62
63
63
64
- Console . prototype . time = function ( label ) {
64
+ Console . prototype . time = function time ( label ) {
65
65
this . _times . set ( label , process . hrtime ( ) ) ;
66
66
} ;
67
67
68
68
69
- Console . prototype . timeEnd = function ( label ) {
69
+ Console . prototype . timeEnd = function timeEnd ( label ) {
70
70
const time = this . _times . get ( label ) ;
71
71
if ( ! time ) {
72
72
process . emitWarning ( `No such label '${ label } ' for console.timeEnd()` ) ;
@@ -90,7 +90,7 @@ Console.prototype.trace = function trace(...args) {
90
90
} ;
91
91
92
92
93
- Console . prototype . assert = function ( expression , ...args ) {
93
+ Console . prototype . assert = function assert ( expression , ...args ) {
94
94
if ( ! expression ) {
95
95
require ( 'assert' ) . ok ( false , util . format . apply ( null , args ) ) ;
96
96
}
0 commit comments