Skip to content

Commit

Permalink
doc: add require statement in the example
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
PoojaDurgad authored and targos committed Nov 3, 2020
1 parent 7b3743d commit 6211ffd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/api/v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
```
Expand Down

0 comments on commit 6211ffd

Please sign in to comment.