| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 496f7ea commit 4131f94
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,7 +20,7 @@ function isStream(obj) { | |||
| 20 | 20 | } | |
| 21 | 21 | ||
| 22 | 22 | function isIterable(obj, isAsync) { | |
| 23 | - if (!obj) return false; | ||
| 23 | + if (obj == null) return false; | ||
| 24 | 24 | if (isAsync === true) return typeof obj[SymbolAsyncIterator] === 'function'; | |
| 25 | 25 | if (isAsync === false) return typeof obj[SymbolIterator] === 'function'; | |
| 26 | 26 | return typeof obj[SymbolAsyncIterator] === 'function' || | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -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(() => {})); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments