We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67dc2bf commit 5998703Copy full SHA for 5998703
lib/stream/promises.js
@@ -30,10 +30,8 @@ function isStream(obj) {
30
return isReadable(obj) || isWritable(obj);
31
}
32
33
-function isIterable(obj, isAsync) {
+function isIterable(obj) {
34
if (!obj) return false;
35
- if (isAsync === true) return typeof obj[SymbolAsyncIterator] === 'function';
36
- if (isAsync === false) return typeof obj[SymbolIterator] === 'function';
37
return typeof obj[SymbolAsyncIterator] === 'function' ||
38
typeof obj[SymbolIterator] === 'function';
39
0 commit comments