Skip to content

Commit f8a6eda

Browse files
TrottBridgeAR
authored andcommitted
doc,console: use code markup/markdown in headers
PR-URL: #31086 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 27790fc commit f8a6eda

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

doc/api/console.md

+25-25
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ myConsole.warn(`Danger ${name}! Danger!`);
5454
// Prints: Danger Will Robinson! Danger!, to err
5555
```
5656

57-
## Class: Console
57+
## Class: `Console`
5858
<!-- YAML
5959
changes:
6060
- version: v8.0.0
@@ -77,8 +77,8 @@ const { Console } = require('console');
7777
const { Console } = console;
7878
```
7979

80-
### new Console(stdout\[, stderr\]\[, ignoreErrors\])
81-
### new Console(options)
80+
### `new Console(stdout[, stderr][, ignoreErrors])`
81+
### `new Console(options)`
8282
<!-- YAML
8383
changes:
8484
- version: v8.0.0
@@ -130,7 +130,7 @@ The global `console` is a special `Console` whose output is sent to
130130
new Console({ stdout: process.stdout, stderr: process.stderr });
131131
```
132132

133-
### console.assert(value\[, ...message\])
133+
### `console.assert(value[, ...message])`
134134
<!-- YAML
135135
added: v0.1.101
136136
changes:
@@ -158,7 +158,7 @@ console.assert(false, 'Whoops %s work', 'didn\'t');
158158
Calling `console.assert()` with a falsy assertion will only cause the `message`
159159
to be printed to the console without interrupting execution of subsequent code.
160160

161-
### console.clear()
161+
### `console.clear()`
162162
<!-- YAML
163163
added: v8.3.0
164164
-->
@@ -172,7 +172,7 @@ operates similarly to the `clear` shell command. On Windows, `console.clear()`
172172
will clear only the output in the current terminal viewport for the Node.js
173173
binary.
174174

175-
### console.count(\[label\])
175+
### `console.count([label])`
176176
<!-- YAML
177177
added: v8.3.0
178178
-->
@@ -205,7 +205,7 @@ undefined
205205
>
206206
```
207207

208-
### console.countReset(\[label\])
208+
### `console.countReset([label])`
209209
<!-- YAML
210210
added: v8.3.0
211211
-->
@@ -227,7 +227,7 @@ undefined
227227
>
228228
```
229229

230-
### console.debug(data\[, ...args\])
230+
### `console.debug(data[, ...args])`
231231
<!-- YAML
232232
added: v8.0.0
233233
changes:
@@ -241,7 +241,7 @@ changes:
241241

242242
The `console.debug()` function is an alias for [`console.log()`][].
243243

244-
### console.dir(obj\[, options\])
244+
### `console.dir(obj[, options])`
245245
<!-- YAML
246246
added: v0.1.101
247247
-->
@@ -260,7 +260,7 @@ added: v0.1.101
260260
Uses [`util.inspect()`][] on `obj` and prints the resulting string to `stdout`.
261261
This function bypasses any custom `inspect()` function defined on `obj`.
262262

263-
### console.dirxml(...data)
263+
### `console.dirxml(...data)`
264264
<!-- YAML
265265
added: v8.0.0
266266
changes:
@@ -274,7 +274,7 @@ changes:
274274
This method calls `console.log()` passing it the arguments received.
275275
This method does not produce any XML formatting.
276276

277-
### console.error(\[data\]\[, ...args\])
277+
### `console.error([data][, ...args])`
278278
<!-- YAML
279279
added: v0.1.100
280280
-->
@@ -299,7 +299,7 @@ If formatting elements (e.g. `%d`) are not found in the first string then
299299
[`util.inspect()`][] is called on each argument and the resulting string
300300
values are concatenated. See [`util.format()`][] for more information.
301301

302-
### console.group(\[...label\])
302+
### `console.group([...label])`
303303
<!-- YAML
304304
added: v8.5.0
305305
-->
@@ -311,21 +311,21 @@ Increases indentation of subsequent lines by two spaces.
311311
If one or more `label`s are provided, those are printed first without the
312312
additional indentation.
313313

314-
### console.groupCollapsed()
314+
### `console.groupCollapsed()`
315315
<!-- YAML
316316
added: v8.5.0
317317
-->
318318

319319
An alias for [`console.group()`][].
320320

321-
### console.groupEnd()
321+
### `console.groupEnd()`
322322
<!-- YAML
323323
added: v8.5.0
324324
-->
325325

326326
Decreases indentation of subsequent lines by two spaces.
327327

328-
### console.info(\[data\]\[, ...args\])
328+
### `console.info([data][, ...args])`
329329
<!-- YAML
330330
added: v0.1.100
331331
-->
@@ -335,7 +335,7 @@ added: v0.1.100
335335

336336
The `console.info()` function is an alias for [`console.log()`][].
337337

338-
### console.log(\[data\]\[, ...args\])
338+
### `console.log([data][, ...args])`
339339
<!-- YAML
340340
added: v0.1.100
341341
-->
@@ -358,7 +358,7 @@ console.log('count:', count);
358358

359359
See [`util.format()`][] for more information.
360360

361-
### console.table(tabularData\[, properties\])
361+
### `console.table(tabularData[, properties])`
362362
<!-- YAML
363363
added: v10.0.0
364364
-->
@@ -395,7 +395,7 @@ console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
395395
// └─────────┴─────┘
396396
```
397397

398-
### console.time(\[label\])
398+
### `console.time([label])`
399399
<!-- YAML
400400
added: v0.1.104
401401
-->
@@ -407,7 +407,7 @@ are identified by a unique `label`. Use the same `label` when calling
407407
[`console.timeEnd()`][] to stop the timer and output the elapsed time in
408408
milliseconds to `stdout`. Timer durations are accurate to the sub-millisecond.
409409

410-
### console.timeEnd(\[label\])
410+
### `console.timeEnd([label])`
411411
<!-- YAML
412412
added: v0.1.104
413413
changes:
@@ -429,7 +429,7 @@ console.timeEnd('100-elements');
429429
// prints 100-elements: 225.438ms
430430
```
431431

432-
### console.timeLog(\[label\]\[, ...data\])
432+
### `console.timeLog([label][, ...data])`
433433
<!-- YAML
434434
added: v10.7.0
435435
-->
@@ -449,7 +449,7 @@ doExpensiveProcess2(value);
449449
console.timeEnd('process');
450450
```
451451

452-
### console.trace(\[message\]\[, ...args\])
452+
### `console.trace([message][, ...args])`
453453
<!-- YAML
454454
added: v0.1.104
455455
-->
@@ -476,7 +476,7 @@ console.trace('Show me');
476476
// at REPLServer.Interface._ttyWrite (readline.js:826:14)
477477
```
478478

479-
### console.warn(\[data\]\[, ...args\])
479+
### `console.warn([data][, ...args])`
480480
<!-- YAML
481481
added: v0.1.100
482482
-->
@@ -491,7 +491,7 @@ The following methods are exposed by the V8 engine in the general API but do
491491
not display anything unless used in conjunction with the [inspector][]
492492
(`--inspect` flag).
493493

494-
### console.profile(\[label\])
494+
### `console.profile([label])`
495495
<!-- YAML
496496
added: v8.0.0
497497
-->
@@ -510,7 +510,7 @@ console.profileEnd('MyLabel');
510510
// Adds the profile 'MyLabel' to the Profiles panel of the inspector.
511511
```
512512

513-
### console.profileEnd(\[label\])
513+
### `console.profileEnd([label])`
514514
<!-- YAML
515515
added: v8.0.0
516516
-->
@@ -525,7 +525,7 @@ the report to the **Profiles** panel of the inspector. See
525525
If this method is called without a label, the most recently started profile is
526526
stopped.
527527

528-
### console.timeStamp(\[label\])
528+
### `console.timeStamp([label])`
529529
<!-- YAML
530530
added: v8.0.0
531531
-->

0 commit comments

Comments
 (0)