Skip to content

Commit 5998703

Browse files
committed
stream: remove unreachable code
isIterable() is called in one place with only one argument, so the second argument and associated logic for it can be removed.
1 parent 67dc2bf commit 5998703

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/stream/promises.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ function isStream(obj) {
3030
return isReadable(obj) || isWritable(obj);
3131
}
3232

33-
function isIterable(obj, isAsync) {
33+
function isIterable(obj) {
3434
if (!obj) return false;
35-
if (isAsync === true) return typeof obj[SymbolAsyncIterator] === 'function';
36-
if (isAsync === false) return typeof obj[SymbolIterator] === 'function';
3735
return typeof obj[SymbolAsyncIterator] === 'function' ||
3836
typeof obj[SymbolIterator] === 'function';
3937
}

0 commit comments

Comments
 (0)