This repository was archived by the owner on Apr 22, 2023. It is now read-only.
File tree 4 files changed +58
-0
lines changed
4 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
* [ Synopsis] ( synopsis.html )
4
4
* [ Globals] ( globals.html )
5
+ * [ STDIO] ( stdio.html )
5
6
* [ Timers] ( timers.html )
6
7
* [ Modules] ( modules.html )
7
8
* [ C/C++ Addons] ( addons.html )
Original file line number Diff line number Diff line change 1
1
2
2
@include synopsis
3
3
@include globals
4
+ @include stdio
4
5
@include timers
5
6
@include modules
6
7
@include addons
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ scope; `var something` inside a Node module will be local to that module.
16
16
17
17
The process object. See the [ process object] ( process.html#process ) section.
18
18
19
+ ### console
20
+
21
+ Used to print to stdout and stderr. See the [ stdio] ( stdio.html ) section.
22
+
23
+
19
24
### require()
20
25
21
26
To require modules. See the [ Modules] ( modules.html#modules ) section.
Original file line number Diff line number Diff line change
1
+ ## console
2
+
3
+ Browser-like object for printing to stdout and stderr.
4
+
5
+ ### console.log()
6
+
7
+ Prints to stdout with newline. This function can take multiple arguments in a
8
+ ` printf() ` -like way. Example:
9
+
10
+ console.log('count: %d', count);
11
+
12
+ If formating elements are not found in the first string then ` util.inspect `
13
+ is used on each argument.
14
+
15
+ ### console.info()
16
+
17
+ Same as ` console.log ` .
18
+
19
+ ### console.warn()
20
+ ### console.error()
21
+
22
+ Same as ` console.log ` but prints to stderr.
23
+
24
+ ### console.dir(obj)
25
+
26
+ Uses ` util.inspect ` on ` obj ` and prints resulting string to stderr.
27
+
28
+ ### console.time(label)
29
+
30
+ Mark a time.
31
+
32
+
33
+ ### console.timeEnd(label)
34
+
35
+ Finish timer, record output. Example
36
+
37
+ console.time('100-elements');
38
+ while (var i = 0; i < 100; i++) {
39
+ ;
40
+ }
41
+ console.timeEnd('100-elements');
42
+
43
+
44
+ ### console.trace()
45
+
46
+ Print a stack trace to stderr of the current position.
47
+
48
+ ### console.assert()
49
+
50
+ Same as ` assert.ok() ` .
51
+
You can’t perform that action at this time.
0 commit comments