diff options
Diffstat (limited to 'doc/api/diagnostics_channel.md')
-rw-r--r-- | doc/api/diagnostics_channel.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/api/diagnostics_channel.md b/doc/api/diagnostics_channel.md index 25dac82b116..019fe9a6614 100644 --- a/doc/api/diagnostics_channel.md +++ b/doc/api/diagnostics_channel.md @@ -173,7 +173,7 @@ will be run synchronously whenever a message is published to the channel. Any errors thrown in the message handler will trigger an [`'uncaughtException'`][]. ```mjs -import diagnostics_channel from 'diagnostics_channel'; +import diagnostics_channel from 'node:diagnostics_channel'; diagnostics_channel.subscribe('my-channel', (message, name) => { // Received data @@ -181,7 +181,7 @@ diagnostics_channel.subscribe('my-channel', (message, name) => { ``` ```cjs -const diagnostics_channel = require('diagnostics_channel'); +const diagnostics_channel = require('node:diagnostics_channel'); diagnostics_channel.subscribe('my-channel', (message, name) => { // Received data @@ -204,7 +204,7 @@ Remove a message handler previously registered to this channel with [`diagnostics_channel.subscribe(name, onMessage)`][]. ```mjs -import diagnostics_channel from 'diagnostics_channel'; +import diagnostics_channel from 'node:diagnostics_channel'; function onMessage(message, name) { // Received data @@ -216,7 +216,7 @@ diagnostics_channel.unsubscribe('my-channel', onMessage); ``` ```cjs -const diagnostics_channel = require('diagnostics_channel'); +const diagnostics_channel = require('node:diagnostics_channel'); function onMessage(message, name) { // Received data |