diff --git a/doc/api/stream.md b/doc/api/stream.md index 68b7ad25d43231..0bfac2b3db8299 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1969,7 +1969,7 @@ const anyBigFile = await Readable.from([ 'file1', 'file2', 'file3', -]).map(async (fileName) => { +]).some(async (fileName) => { const stats = await stat(fileName); return stat.size > 1024 * 1024; }, { concurrency: 2 }); @@ -2017,7 +2017,7 @@ const allBigFiles = await Readable.from([ 'file1', 'file2', 'file3', -]).map(async (fileName) => { +]).every(async (fileName) => { const stats = await stat(fileName); return stat.size > 1024 * 1024; }, { concurrency: 2 });