File tree 3 files changed +9
-19
lines changed
3 files changed +9
-19
lines changed Original file line number Diff line number Diff line change @@ -282,15 +282,13 @@ Defaults to `false`. Colors are customizable; see
282
282
added: v8.0.0
283
283
changes:
284
284
- version: REPLACEME
285
- pr-url: https://github.com/nodejs/node/pull/17128
286
- description: "`console.dirxml` now calls `console.dir ` for each argument ."
285
+ pr-url: https://github.com/nodejs/node/pull/17152
286
+ description: "`console.dirxml` now calls `console.log ` for its arguments ."
287
287
-->
288
288
* ` ...data ` {any}
289
289
290
- This method calls ` console.dir() ` with default options for each argument it
291
- receives. See [ ` console.dir() ` ] [ ] for more details about said defaults.
292
- Please note that this method doesn't produce any xml formatting and uses the
293
- default ` console.dir() ` formatting resolution instead.
290
+ This method calls ` console.log() ` passing it the arguments received.
291
+ Please note that this method does not produce any XML formatting.
294
292
295
293
### console.error([ data] [ , ...args ] )
296
294
<!-- YAML
@@ -524,7 +522,6 @@ added: v8.0.0
524
522
This method does not display anything unless used in the inspector. The
525
523
` console.timelineEnd() ` method is the deprecated form of [ ` console.timeEnd() ` ] [ ] .
526
524
527
- [ `console.dir()` ] : #console_console_dir_obj_options
528
525
[ `console.error()` ] : #console_console_error_data_args
529
526
[ `console.group()` ] : #console_console_group_label
530
527
[ `console.log()` ] : #console_console_log_data_args
Original file line number Diff line number Diff line change @@ -162,11 +162,7 @@ Console.prototype.dir = function dir(object, options) {
162
162
} ;
163
163
164
164
165
- Console . prototype . dirxml = function dirxml ( ...data ) {
166
- for ( const item of data ) {
167
- Console . prototype . dir . call ( this , item ) ;
168
- }
169
- } ;
165
+ Console . prototype . dirxml = Console . prototype . log ;
170
166
171
167
172
168
Console . prototype . time = function time ( label = 'default' ) {
Original file line number Diff line number Diff line change @@ -179,13 +179,10 @@ assert.strictEqual(strings.shift(),
179
179
"{ foo: 'bar', inspect: [Function: inspect] }\n" ) ;
180
180
assert . ok ( strings . shift ( ) . includes ( 'foo: [Object]' ) ) ;
181
181
assert . strictEqual ( strings . shift ( ) . includes ( 'baz' ) , false ) ;
182
- assert . strictEqual ( strings . shift ( ) ,
183
- "{ foo: 'bar', inspect: [Function: inspect] }\n" ) ;
184
- assert . strictEqual ( strings . shift ( ) ,
185
- "{ foo: 'bar', inspect: [Function: inspect] }\n" ) ;
186
- assert . strictEqual ( strings . shift ( ) . includes ( 'foo: { bar: { baz:' ) , true ) ;
187
- assert . strictEqual ( strings . shift ( ) . includes ( 'quux' ) , true ) ;
188
- assert . strictEqual ( strings . shift ( ) . includes ( 'quux: true' ) , true ) ;
182
+ assert . strictEqual ( strings . shift ( ) , 'inspect inspect\n' ) ;
183
+ assert . ok ( strings [ 0 ] . includes ( 'foo: { bar: { baz:' ) ) ;
184
+ assert . ok ( strings [ 0 ] . includes ( 'quux' ) ) ;
185
+ assert . ok ( strings . shift ( ) . includes ( 'quux: true' ) ) ;
189
186
190
187
assert . ok ( / ^ l a b e l : \d + \. \d { 3 } m s $ / . test ( strings . shift ( ) . trim ( ) ) ) ;
191
188
assert . ok ( / ^ _ _ p r o t o _ _ : \d + \. \d { 3 } m s $ / . test ( strings . shift ( ) . trim ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments