Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/api/diagnostics_channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ 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
});
```

```cjs
const diagnostics_channel = require('diagnostics_channel');
const diagnostics_channel = require('node:diagnostics_channel');

diagnostics_channel.subscribe('my-channel', (message, name) => {
// Received data
Expand All @@ -196,7 +196,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
Expand All @@ -208,7 +208,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
Expand Down
10 changes: 5 additions & 5 deletions doc/api/v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -923,17 +923,17 @@ contains the following script:
```cjs
'use strict';

const fs = require('fs');
const zlib = require('zlib');
const path = require('path');
const assert = require('assert');
const fs = require('node:fs');
const zlib = require('node:zlib');
const path = require('node:path');
const assert = require('node:assert');

const {
isBuildingSnapshot,
addSerializeCallback,
addDeserializeCallback,
setDeserializeMainFunction
} = require('v8').startupSnapshot;
} = require('node:v8').startupSnapshot;

const filePath = path.resolve(__dirname, '../x1024.txt');
const storage = {};
Expand Down
4 changes: 2 additions & 2 deletions doc/api/webstreams.md
Original file line number Diff line number Diff line change
Expand Up @@ -1478,8 +1478,8 @@ console.log(`from readable: ${data.byteLength}`);

```cjs
const { arrayBuffer } = require('node:stream/consumers');
const { Readable } = require('stream');
const { TextEncoder } = require('util');
const { Readable } = require('node:stream');
const { TextEncoder } = require('node:util');

const encoder = new TextEncoder();
const dataArray = encoder.encode(['hello world from consumers!']);
Expand Down