Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b96c411

Browse filesBrowse files
TrottMylesBorins
authored andcommitted
doc,console: use code markup/markdown in headers
Backport-PR-URL: #31108 PR-URL: #31086 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 4abe955 commit b96c411
Copy full SHA for b96c411

File tree

Expand file treeCollapse file tree

1 file changed

+25
-25
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+25
-25
lines changed
Open diff view settings
Collapse file

β€Ždoc/api/console.mdβ€Ž

Copy file name to clipboardExpand all lines: doc/api/console.md
+25-25Lines changed: 25 additions & 25 deletions
  • Display the source diff
  • Display the rich diff
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
@@ -129,7 +129,7 @@ The global `console` is a special `Console` whose output is sent to
129129
new Console({ stdout: process.stdout, stderr: process.stderr });
130130
```
131131

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

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

174-
### console.count(\[label\])
174+
### `console.count([label])`
175175
<!-- YAML
176176
added: v8.3.0
177177
-->
@@ -204,7 +204,7 @@ undefined
204204
>
205205
```
206206

207-
### console.countReset(\[label\])
207+
### `console.countReset([label])`
208208
<!-- YAML
209209
added: v8.3.0
210210
-->
@@ -226,7 +226,7 @@ undefined
226226
>
227227
```
228228

229-
### console.debug(data\[, ...args\])
229+
### `console.debug(data[, ...args])`
230230
<!-- YAML
231231
added: v8.0.0
232232
changes:
@@ -240,7 +240,7 @@ changes:
240240

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

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

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

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

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

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

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

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

325325
Decreases indentation of subsequent lines by two spaces.
326326

327-
### console.info(\[data\]\[, ...args\])
327+
### `console.info([data][, ...args])`
328328
<!-- YAML
329329
added: v0.1.100
330330
-->
@@ -334,7 +334,7 @@ added: v0.1.100
334334

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

337-
### console.log(\[data\]\[, ...args\])
337+
### `console.log([data][, ...args])`
338338
<!-- YAML
339339
added: v0.1.100
340340
-->
@@ -357,7 +357,7 @@ console.log('count:', count);
357357

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

360-
### console.table(tabularData\[, properties\])
360+
### `console.table(tabularData[, properties])`
361361
<!-- YAML
362362
added: v10.0.0
363363
-->
@@ -394,7 +394,7 @@ console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
394394
// β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”˜
395395
```
396396

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

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

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

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

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

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

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

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

0 commit comments

Comments
0Β (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.