diff --git a/doc/api/v8.md b/doc/api/v8.md index 54e01806079e0a..064d64c382446d 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -104,6 +104,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); ```