Skip to content

Commit f050cab

Browse files
committed
doc: copyedit console doc
PR-URL: #4225 Reviewed-By: Brian White <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c5b4f6b commit f050cab

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

doc/api/console.markdown

+17-17
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Use `require('console').Console` or `console.Console` to access this class.
1919
var Console = require('console').Console;
2020
var Console = console.Console;
2121

22-
You can use `Console` class to custom simple logger like `console`, but with
23-
different output streams.
22+
You can use the `Console` class to create a simple logger like `console` but
23+
with different output streams.
2424

2525
### new Console(stdout[, stderr])
2626

@@ -61,8 +61,8 @@ is blocking:
6161

6262
$ node script.js 2> error.log | tee info.log
6363

64-
In daily use, the blocking/non-blocking dichotomy is not something you
65-
should worry about unless you log huge amounts of data.
64+
Typically, the blocking/non-blocking dichotomy is not something you should
65+
worry about unless you log huge amounts of data.
6666

6767
### console.assert(value[, message][, ...])
6868

@@ -71,19 +71,21 @@ Similar to [`assert.ok()`][], but the error message is formatted as
7171

7272
### console.dir(obj[, options])
7373

74-
Uses [`util.inspect()`][] on `obj` and prints resulting string to stdout. This function
75-
bypasses any custom `inspect()` function on `obj`. An optional *options* object
76-
may be passed that alters certain aspects of the formatted string:
74+
Uses [`util.inspect()`][] on `obj` and prints the resulting string to stdout.
75+
This function bypasses any custom `inspect()` function on `obj`. An optional
76+
`options` object may be passed that alters certain aspects of the formatted
77+
string:
7778

7879
- `showHidden` - if `true` then the object's non-enumerable and symbol
7980
properties will be shown too. Defaults to `false`.
8081

8182
- `depth` - tells `inspect` how many times to recurse while formatting the
8283
object. This is useful for inspecting large complicated objects. Defaults to
83-
`2`. To make it recurse indefinitely pass `null`.
84+
`2`. To make it recurse indefinitely, pass `null`.
8485

8586
- `colors` - if `true`, then the output will be styled with ANSI color codes.
86-
Defaults to `false`. Colors are customizable, see [customizing `util.inspect()` colors][].
87+
Defaults to `false`. Colors are customizable; see
88+
[customizing `util.inspect()` colors][].
8789

8890
### console.error([data][, ...])
8991

@@ -96,14 +98,15 @@ Same as [`console.log()`][].
9698
### console.log([data][, ...])
9799

98100
Prints to stdout with newline. This function can take multiple arguments in a
99-
`printf()`-like way. Example:
101+
`printf()`-like way:
100102

101103
var count = 5;
102104
console.log('count: %d', count);
103105
// prints 'count: 5'
104106

105-
If formatting elements are not found in the first string then [`util.inspect()`][]
106-
is used on each argument. See [`util.format()`][] for more information.
107+
If formatting elements are not found in the first string then
108+
[`util.inspect()`][] is used on each argument. See [`util.format()`][] for more
109+
information.
107110

108111
### console.time(label)
109112

@@ -114,11 +117,8 @@ milliseconds. Timer durations are accurate to the sub-millisecond.
114117

115118
### console.timeEnd(label)
116119

117-
Stops a timer that was previously started by calling
118-
[`console.time()`][] and prints the result to the
119-
console.
120-
121-
Example:
120+
Stops a timer that was previously started by calling [`console.time()`][] and
121+
prints the result to the console:
122122

123123
console.time('100-elements');
124124
for (var i = 0; i < 100; i++) {

0 commit comments

Comments
 (0)