Skip to content

Commit

Permalink
doc: fix stream iterator helpers examples
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
benjamingr authored and targos committed Mar 13, 2023
1 parent 8422ac2 commit f9a0089
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -2237,7 +2237,7 @@ const anyBigFile = await Readable.from([
'file3',
]).some(async (fileName) => {
const stats = await stat(fileName);
return stat.size > 1024 * 1024;
return stats.size > 1024 * 1024;
}, { concurrency: 2 });
console.log(anyBigFile); // `true` if any file in the list is bigger than 1MB
console.log('done'); // Stream has finished
Expand Down Expand Up @@ -2289,7 +2289,7 @@ const foundBigFile = await Readable.from([
'file3',
]).find(async (fileName) => {
const stats = await stat(fileName);
return stat.size > 1024 * 1024;
return stats.size > 1024 * 1024;
}, { concurrency: 2 });
console.log(foundBigFile); // File name of large file, if any file in the list is bigger than 1MB
console.log('done'); // Stream has finished
Expand Down Expand Up @@ -2339,7 +2339,7 @@ const allBigFiles = await Readable.from([
'file3',
]).every(async (fileName) => {
const stats = await stat(fileName);
return stat.size > 1024 * 1024;
return stats.size > 1024 * 1024;
}, { concurrency: 2 });
// `true` if all files in the list are bigger than 1MiB
console.log(allBigFiles);
Expand Down

0 comments on commit f9a0089

Please sign in to comment.