returning last stream
pgte opened this issue · 5 comments
pgte commented
Before version 2, pump()
used to return the last stream, and apparently now it doesn't.
Even though this wasn't a documented feature before, I find it really useful to simplify the code.
pump@1:
return pump(s1, s2)
pump@2:
pump(s1, s2)
return s2
Do you think this could be a useful feature? If so, I'm willing to add a PR.
yoshuawuyts commented
This was explicitely removed as per #18.
mafintosh commented
I miss this feature as well actually. Could you open a PR that readds it +
docs? Then we can decide finally in there if it should be reverted back :)
…On Sat, Jan 13, 2018, 17:03 Yoshua Wuyts ***@***.***> wrote:
This was explicitely removed as per #18
<#18>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#27 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAW_VZSB3pXJ-PV4kZ8JCLfKiwSwaYOmks5tKMWggaJpZM4RcaVI>
.
phated commented
I don't understand what you miss about the feature. It didn't actually work correctly and the use cases are solved by pumpify. @mafintosh can you explain further?
mafintosh commented
The main usecase is returning the result of a pipeline, similar to doing
`return a.pipe(b)` you'd do `return pump(a, b)`. This makes sense when you
want to return the last readable stream. Like I mentioned a PR that adds
docs is a better place to discuss it so all are on the same page about what
it does and whether it should be reverted. Pros and cons :)
…On Sun, Jan 14, 2018, 00:45 Blaine Bublitz ***@***.***> wrote:
I don't understand what you miss about the feature. It didn't actually
work correctly and the use cases are solved by pumpify. @mafintosh
<https://github.com/mafintosh> can you explain further?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#27 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAW_VS4XpmH6ARPr6wSAQZVOqYxnOjeiks5tKTIYgaJpZM4RcaVI>
.
mafintosh commented
Out in 3.0.0