Skip to content

Commit 0254fd1

Browse files
benjamingrdanielleadams
authored andcommitted
doc: fix stream iterator helpers examples
PR-URL: #46897 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Debadree Chatterjee <[email protected]>
1 parent 339b52f commit 0254fd1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/stream.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2229,7 +2229,7 @@ const anyBigFile = await Readable.from([
22292229
'file3',
22302230
]).some(async (fileName) => {
22312231
const stats = await stat(fileName);
2232-
return stat.size > 1024 * 1024;
2232+
return stats.size > 1024 * 1024;
22332233
}, { concurrency: 2 });
22342234
console.log(anyBigFile); // `true` if any file in the list is bigger than 1MB
22352235
console.log('done'); // Stream has finished
@@ -2279,7 +2279,7 @@ const foundBigFile = await Readable.from([
22792279
'file3',
22802280
]).find(async (fileName) => {
22812281
const stats = await stat(fileName);
2282-
return stat.size > 1024 * 1024;
2282+
return stats.size > 1024 * 1024;
22832283
}, { concurrency: 2 });
22842284
console.log(foundBigFile); // File name of large file, if any file in the list is bigger than 1MB
22852285
console.log('done'); // Stream has finished
@@ -2327,7 +2327,7 @@ const allBigFiles = await Readable.from([
23272327
'file3',
23282328
]).every(async (fileName) => {
23292329
const stats = await stat(fileName);
2330-
return stat.size > 1024 * 1024;
2330+
return stats.size > 1024 * 1024;
23312331
}, { concurrency: 2 });
23322332
// `true` if all files in the list are bigger than 1MiB
23332333
console.log(allBigFiles);

0 commit comments

Comments
 (0)