From 454c6fc6cbfa014fde0c81611f2d2219416a3690 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Thu, 30 Mar 2023 00:26:20 +0900 Subject: [PATCH] doc: add importing util to example of `process.report.getReport' 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()`. --- doc/api/process.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/process.md b/doc/api/process.md index e9ef0a972de01c..a7594aa205b57d 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -2375,7 +2375,7 @@ console.log(memoryUsage.rss()); ``` ```cjs -const { rss } = require('node:process'); +const { memoryUsage } = require('node:process'); console.log(memoryUsage.rss()); // 35655680 @@ -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); @@ -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);