From 48d2aca39b5d9a42afb2e2598e7e463406798eac Mon Sep 17 00:00:00 2001 From: "Pooja D.P" Date: Thu, 8 Oct 2020 10:28:49 +0400 Subject: [PATCH] doc: add require statement in the example PR-URL: https://github.com/nodejs/node/pull/35554 Reviewed-By: Anna Henningsen Reviewed-By: Harshitha K P Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Gireesh Punathil --- doc/api/v8.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/v8.md b/doc/api/v8.md index 2c4f956ff684a9..e0b2039264b63b 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -102,6 +102,8 @@ Chrome DevTools. The JSON schema is undocumented and specific to the V8 engine, and may change from one version of V8 to the next. ```js +// Print heap snapshot to the console +const v8 = require('v8'); const stream = v8.getHeapSnapshot(); stream.pipe(process.stdout); ```