We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 496f7ea commit 4131f94Copy full SHA for 4131f94
lib/internal/streams/utils.js
@@ -20,7 +20,7 @@ function isStream(obj) {
20
}
21
22
function isIterable(obj, isAsync) {
23
- if (!obj) return false;
+ if (obj == null) return false;
24
if (isAsync === true) return typeof obj[SymbolAsyncIterator] === 'function';
25
if (isAsync === false) return typeof obj[SymbolIterator] === 'function';
26
return typeof obj[SymbolAsyncIterator] === 'function' ||
test/parallel/test-stream-pipeline-with-empty-string.js
@@ -0,0 +1,18 @@
1
+'use strict';
2
+
3
+const common = require('../common');
4
+const {
5
+ pipeline,
6
+ PassThrough
7
+} = require('stream');
8
9
10
+async function runTest() {
11
+ await pipeline(
12
+ '',
13
+ new PassThrough({ objectMode: true }),
14
+ common.mustCall(() => { })
15
+ );
16
+}
17
18
+runTest().then(common.mustCall(() => {}));
0 commit comments