mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
13 lines
334 B
JavaScript
13 lines
334 B
JavaScript
|
'use strict';
|
||
|
|
||
|
require('../common');
|
||
|
const util = require('util');
|
||
|
|
||
|
const err = new Error('foo\nbar');
|
||
|
|
||
|
console.log(util.inspect({ err, nested: { err } }, { compact: true }));
|
||
|
console.log(util.inspect({ err, nested: { err } }, { compact: false }));
|
||
|
|
||
|
err.foo = 'bar';
|
||
|
console.log(util.inspect(err, { compact: true, breakLength: 5 }));
|