Skip to content

Commit 92a6138

Browse files
benjamingrtargos
authored andcommitted
doc: fix stream iterator helpers examples
PR-URL: #46897 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
1 parent f8765be commit 92a6138

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
@@ -2237,7 +2237,7 @@ const anyBigFile = await Readable.from([
22372237
'file3',
22382238
]).some(async (fileName) => {
22392239
const stats = await stat(fileName);
2240-
return stat.size > 1024 * 1024;
2240+
return stats.size > 1024 * 1024;
22412241
}, { concurrency: 2 });
22422242
console.log(anyBigFile); // `true` if any file in the list is bigger than 1MB
22432243
console.log('done'); // Stream has finished
@@ -2289,7 +2289,7 @@ const foundBigFile = await Readable.from([
22892289
'file3',
22902290
]).find(async (fileName) => {
22912291
const stats = await stat(fileName);
2292-
return stat.size > 1024 * 1024;
2292+
return stats.size > 1024 * 1024;
22932293
}, { concurrency: 2 });
22942294
console.log(foundBigFile); // File name of large file, if any file in the list is bigger than 1MB
22952295
console.log('done'); // Stream has finished
@@ -2339,7 +2339,7 @@ const allBigFiles = await Readable.from([
23392339
'file3',
23402340
]).every(async (fileName) => {
23412341
const stats = await stat(fileName);
2342-
return stat.size > 1024 * 1024;
2342+
return stats.size > 1024 * 1024;
23432343
}, { concurrency: 2 });
23442344
// `true` if all files in the list are bigger than 1MiB
23452345
console.log(allBigFiles);

0 commit comments

Comments
 (0)