Comparing version
@@ -29,3 +29,7 @@ import { pushable } from 'it-pushable'; | ||
}); | ||
return merge(stream, duplex.source); | ||
const sourceWrap = async function* () { | ||
yield* duplex.source; | ||
stream.end(); | ||
}; | ||
return merge(stream, sourceWrap()); | ||
} | ||
@@ -32,0 +36,0 @@ return duplex.source; |
{ | ||
"name": "it-pipe", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Utility to \"pipe\" async iterables together", | ||
@@ -126,2 +126,3 @@ "type": "module", | ||
"it-drain": "^1.0.5", | ||
"p-defer": "^4.0.0", | ||
"streaming-iterables": "^6.0.0" | ||
@@ -128,0 +129,0 @@ }, |
@@ -25,3 +25,3 @@ import { pushable } from 'it-pushable' | ||
const duplexPipelineFn = <TSource> (duplex: any) => { | ||
const duplexPipelineFn = <TSource> (duplex: it.Duplex<TSource>) => { | ||
return (source: any): it.Source<TSource> => { | ||
@@ -38,3 +38,8 @@ const p = duplex.sink(source) | ||
return merge(stream, duplex.source) | ||
const sourceWrap = async function * () { | ||
yield * duplex.source | ||
stream.end() | ||
} | ||
return merge(stream, sourceWrap()) | ||
} | ||
@@ -41,0 +46,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
21847
1.87%226
3.67%6
20%