8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27790fc commit f8a6edaCopy full SHA for f8a6eda
doc/api/console.md
@@ -54,7 +54,7 @@ myConsole.warn(`Danger ${name}! Danger!`);
54
// Prints: Danger Will Robinson! Danger!, to err
55
```
56
57
-## Class: Console
+## Class: `Console`
58
<!-- YAML
59
changes:
60
- version: v8.0.0
@@ -77,8 +77,8 @@ const { Console } = require('console');
77
const { Console } = console;
78
79
80
-### new Console(stdout\[, stderr\]\[, ignoreErrors\])
81
-### new Console(options)
+### `new Console(stdout[, stderr][, ignoreErrors])`
+### `new Console(options)`
82
83
84
@@ -130,7 +130,7 @@ The global `console` is a special `Console` whose output is sent to
130
new Console({ stdout: process.stdout, stderr: process.stderr });
131
132
133
-### console.assert(value\[, ...message\])
+### `console.assert(value[, ...message])`
134
135
added: v0.1.101
136
@@ -158,7 +158,7 @@ console.assert(false, 'Whoops %s work', 'didn\'t');
158
Calling `console.assert()` with a falsy assertion will only cause the `message`
159
to be printed to the console without interrupting execution of subsequent code.
160
161
-### console.clear()
+### `console.clear()`
162
163
added: v8.3.0
164
-->
@@ -172,7 +172,7 @@ operates similarly to the `clear` shell command. On Windows, `console.clear()`
172
will clear only the output in the current terminal viewport for the Node.js
173
binary.
174
175
-### console.count(\[label\])
+### `console.count([label])`
176
177
178
@@ -205,7 +205,7 @@ undefined
205
>
206
207
208
-### console.countReset(\[label\])
+### `console.countReset([label])`
209
210
211
@@ -227,7 +227,7 @@ undefined
227
228
229
230
-### console.debug(data\[, ...args\])
+### `console.debug(data[, ...args])`
231
232
added: v8.0.0
233
@@ -241,7 +241,7 @@ changes:
241
242
The `console.debug()` function is an alias for [`console.log()`][].
243
244
-### console.dir(obj\[, options\])
+### `console.dir(obj[, options])`
245
246
247
@@ -260,7 +260,7 @@ added: v0.1.101
260
Uses [`util.inspect()`][] on `obj` and prints the resulting string to `stdout`.
261
This function bypasses any custom `inspect()` function defined on `obj`.
262
263
-### console.dirxml(...data)
+### `console.dirxml(...data)`
264
265
266
@@ -274,7 +274,7 @@ changes:
274
This method calls `console.log()` passing it the arguments received.
275
This method does not produce any XML formatting.
276
277
-### console.error(\[data\]\[, ...args\])
+### `console.error([data][, ...args])`
278
279
added: v0.1.100
280
@@ -299,7 +299,7 @@ If formatting elements (e.g. `%d`) are not found in the first string then
299
[`util.inspect()`][] is called on each argument and the resulting string
300
values are concatenated. See [`util.format()`][] for more information.
301
302
-### console.group(\[...label\])
+### `console.group([...label])`
303
304
added: v8.5.0
305
@@ -311,21 +311,21 @@ Increases indentation of subsequent lines by two spaces.
311
If one or more `label`s are provided, those are printed first without the
312
additional indentation.
313
314
-### console.groupCollapsed()
+### `console.groupCollapsed()`
315
316
317
318
319
An alias for [`console.group()`][].
320
321
-### console.groupEnd()
+### `console.groupEnd()`
322
323
324
325
326
Decreases indentation of subsequent lines by two spaces.
327
328
-### console.info(\[data\]\[, ...args\])
+### `console.info([data][, ...args])`
329
330
331
@@ -335,7 +335,7 @@ added: v0.1.100
335
336
The `console.info()` function is an alias for [`console.log()`][].
337
338
-### console.log(\[data\]\[, ...args\])
+### `console.log([data][, ...args])`
339
340
341
@@ -358,7 +358,7 @@ console.log('count:', count);
358
359
See [`util.format()`][] for more information.
360
361
-### console.table(tabularData\[, properties\])
+### `console.table(tabularData[, properties])`
362
363
added: v10.0.0
364
@@ -395,7 +395,7 @@ console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
395
// └─────────┴─────┘
396
397
398
-### console.time(\[label\])
+### `console.time([label])`
399
400
added: v0.1.104
401
@@ -407,7 +407,7 @@ are identified by a unique `label`. Use the same `label` when calling
407
[`console.timeEnd()`][] to stop the timer and output the elapsed time in
408
milliseconds to `stdout`. Timer durations are accurate to the sub-millisecond.
409
410
-### console.timeEnd(\[label\])
+### `console.timeEnd([label])`
411
412
413
@@ -429,7 +429,7 @@ console.timeEnd('100-elements');
429
// prints 100-elements: 225.438ms
430
431
432
-### console.timeLog(\[label\]\[, ...data\])
+### `console.timeLog([label][, ...data])`
433
434
added: v10.7.0
435
@@ -449,7 +449,7 @@ doExpensiveProcess2(value);
449
console.timeEnd('process');
450
451
452
-### console.trace(\[message\]\[, ...args\])
+### `console.trace([message][, ...args])`
453
454
455
@@ -476,7 +476,7 @@ console.trace('Show me');
476
// at REPLServer.Interface._ttyWrite (readline.js:826:14)
477
478
479
-### console.warn(\[data\]\[, ...args\])
+### `console.warn([data][, ...args])`
480
481
482
@@ -491,7 +491,7 @@ The following methods are exposed by the V8 engine in the general API but do
491
not display anything unless used in conjunction with the [inspector][]
492
(`--inspect` flag).
493
494
-### console.profile(\[label\])
+### `console.profile([label])`
495
496
497
@@ -510,7 +510,7 @@ console.profileEnd('MyLabel');
510
// Adds the profile 'MyLabel' to the Profiles panel of the inspector.
511
512
513
-### console.profileEnd(\[label\])
+### `console.profileEnd([label])`
514
515
516
@@ -525,7 +525,7 @@ the report to the **Profiles** panel of the inspector. See
525
If this method is called without a label, the most recently started profile is
526
stopped.
527
528
-### console.timeStamp(\[label\])
+### `console.timeStamp([label])`
529
530
531