From f03fb05de76a6aea1798d9e5c8b1ef85a0123bf7 Mon Sep 17 00:00:00 2001 From: Benjamin Gruenbaum Date: Wed, 1 Mar 2023 15:39:04 +0100 Subject: [PATCH] docs: fix stream iterator helpers examples Our examples don't run because of a typo and when I asked for feedback on something unrelated I got told that :) Trying to create a PR from the GitHub UI since I am OOO for a bit. I haven't done a PR from GH in a while so hopefully it's not too much trouble cc @MoLow @ronag @nodejs/streams --- doc/api/stream.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index dd28f15a2b711f..d3719dc640f6c8 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2239,7 +2239,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 @@ -2291,7 +2291,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 @@ -2341,7 +2341,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);