@ -66,28 +66,28 @@ Output with timestamp on `stdout`.
require('util').log('Timestamped message.');
require('util').log('Timestamped message.');
## util.inspect(object, [showHidden], [depth], [color s])
## util.inspect(object, [option s])
Return a string representation of `object` , which is useful for debugging.
Return a string representation of `object` , which is useful for debugging.
If `showHidden` is `true` , then the object's non-enumerable properties will b e
An optional *options* object may be passed that alters certain aspects of th e
shown too. Defaults to `false` .
formatted string:
If `depth` is provided, it tells `inspect` how many times to recurse whil e
- `showHidden` - if `true` then the object's non-enumerable properties will b e
formatting the object. This is useful for inspecting large complicated objects .
shown too. Defaults to `false` .
The default is to only recurse twice. To make it recurse indefinitely, pass
- `depth` - tells `inspect` how many times to recurse while formatting the
in `null` for `depth` .
object. This is useful for inspecting large complicated objects. Defaults to
`2` . To make it recurse indefinitely pass `null` .
If `colors` is `true` , the output will be styled with ANSI color codes.
- `colors` - if `true` , then the output will be styled with ANSI color codes.
Defaults to `false` .
Defaults to `false` . Colors are customizable, see below.
Colors are customizable, see below.
Example of inspecting all properties of the `util` object:
Example of inspecting all properties of the `util` object:
var util = require('util');
var util = require('util');
console.log(util.inspect(util, true, null));
console.log(util.inspect(util, { showHidden: true, depth: null } ));
### Customizing `util.inspect` colors
### Customizing `util.inspect` colors