Skip to content

Commit 33ad11a

Browse files
codenamenamaduh95
authored andcommitted
doc: instantiate resolver object
PR-URL: #60476 Fixes: #60455 Refs: https://nodejs.org/api/stream.html#readabletoarrayoptions Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 3b01cbb commit 33ad11a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/api/stream.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,6 +2305,8 @@ import { Resolver } from 'node:dns/promises';
23052305

23062306
await Readable.from([1, 2, 3, 4]).toArray(); // [1, 2, 3, 4]
23072307

2308+
const resolver = new Resolver();
2309+
23082310
// Make dns queries concurrently using .map and collect
23092311
// the results into an array using toArray
23102312
const dnsResults = await Readable.from([

0 commit comments

Comments
 (0)