diff options
author | Pooja D.P <Pooja.D.P@ibm.com> | 2020-10-08 09:28:49 +0300 |
---|---|---|
committer | Gireesh Punathil <gpunathi@in.ibm.com> | 2020-10-26 14:23:24 +0300 |
commit | 48d2aca39b5d9a42afb2e2598e7e463406798eac (patch) | |
tree | 324ac885bb1561a0ddb707b302affe2b0e1c39d2 | |
parent | a8b8bc89066ab8811120dea5c0f6fa2b330ecd4b (diff) |
doc: add require statement in the example
PR-URL: https://github.com/nodejs/node/pull/35554
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
-rw-r--r-- | doc/api/v8.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/api/v8.md b/doc/api/v8.md index 2c4f956ff68..e0b2039264b 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); ``` |