Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 92a6138

Browse filesBrowse 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
Copy full SHA for 92a6138

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎doc/api/stream.md‎

Copy file name to clipboardExpand all lines: doc/api/stream.md
+3-3Lines changed: 3 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.