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 of `process.report.getReport`.
Plus, fix wrong importing in example of `process.memoryUsage.rss()`.
  • Loading branch information
deokjinkim committed Mar 30, 2023
1 parent 3cf65bd commit 454c6fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/api/process.md
Expand Up @@ -2375,7 +2375,7 @@ console.log(memoryUsage.rss());
```
```cjs
const { rss } = require('node:process');
const { memoryUsage } = require('node:process');

console.log(memoryUsage.rss());
// 35655680
Expand Down 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 454c6fc

Please sign in to comment.