Skip to content

Commit

Permalink
doc: add importing util to example of `process.report.getReport'
Browse files Browse the repository at this point in the history
util.inspect() is used, but `util` is not imported.
So added importing util to example.
  • Loading branch information
deokjinkim committed Mar 29, 2023
1 parent 3cf65bd commit ff05a69
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2960,6 +2960,7 @@ present.
```mjs
import { report } from 'node:process';
import util from 'node:util';

const data = report.getReport();
console.log(data.header.nodejsVersion);
Expand All @@ -2971,6 +2972,7 @@ fs.writeFileSync('my-report.log', util.inspect(data), 'utf8');
```cjs
const { report } = require('node:process');
const util = require('node:util');

const data = report.getReport();
console.log(data.header.nodejsVersion);
Expand Down

0 comments on commit ff05a69

Please sign in to comment.