Skip to content

Commit d9e47f1

Browse files
benjamingrMoLow
authored andcommitted
doc: fix stream iterator helpers examples
1 parent d0608c2 commit d9e47f1

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
@@ -2239,7 +2239,7 @@ const anyBigFile = await Readable.from([
22392239
'file3',
22402240
]).some(async (fileName) => {
22412241
const stats = await stat(fileName);
2242-
return stat.size > 1024 * 1024;
2242+
return stats.size > 1024 * 1024;
22432243
}, { concurrency: 2 });
22442244
console.log(anyBigFile); // `true` if any file in the list is bigger than 1MB
22452245
console.log('done'); // Stream has finished
@@ -2291,7 +2291,7 @@ const foundBigFile = await Readable.from([
22912291
'file3',
22922292
]).find(async (fileName) => {
22932293
const stats = await stat(fileName);
2294-
return stat.size > 1024 * 1024;
2294+
return stats.size > 1024 * 1024;
22952295
}, { concurrency: 2 });
22962296
console.log(foundBigFile); // File name of large file, if any file in the list is bigger than 1MB
22972297
console.log('done'); // Stream has finished
@@ -2341,7 +2341,7 @@ const allBigFiles = await Readable.from([
23412341
'file3',
23422342
]).every(async (fileName) => {
23432343
const stats = await stat(fileName);
2344-
return stat.size > 1024 * 1024;
2344+
return stats.size > 1024 * 1024;
23452345
}, { concurrency: 2 });
23462346
// `true` if all files in the list are bigger than 1MiB
23472347
console.log(allBigFiles);

0 commit comments

Comments
 (0)