Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unpipe method #64

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

tinchoz49
Copy link

Hi @mafintosh, this is my first attempt to add the unpipe method. #11

@mafintosh
Copy link
Owner

Curious, what is your usecase for unpipe? I haven't found any, since is why I haven't added it, but can be convinced

@tinchoz49
Copy link
Author

Yes, I never use it until today.

I'm working on a re-implementation of aws-lambda-fastify and I'm building a Readable Stream with streamx to simulate the http.IncomingMessage.

So the tests are not passing because of this: https://github.com/fastify/fastify-multipart/blob/master/index.js#L500 (first time I saw someone using unpipe)

@tinchoz49
Copy link
Author

btw I know that I can just extend from http.IncomingMessage and use the node Readable stream but with streamx I get a performance improve of almost 20k of req/seq more. The stream state lifecycle in streamx is more simple and faster.

@tinchoz49
Copy link
Author

I don't like the unpipe but maybe we can added only for compatibility support.

@mafintosh
Copy link
Owner

Okay nice! I can be convinced :)

@James4Ever0
Copy link

unpipe could be added in order to fix issues like this when working with webtorrent and fluent-ffmpeg. Otherwise I have to monkey patch this object.

@tforster
Copy link

tforster commented Jul 9, 2023

I don't like the unpipe but maybe we can added only for compatibility support.

Is there a better/different implementation/option for unpipe? I am using it in one of my projects and it is preventing me from upgrading to vinyl-fs 4.

@phated
Copy link

phated commented Jul 11, 2023

Is there a better/different implementation/option for unpipe? I am using it in one of my projects and it is preventing me from upgrading to vinyl-fs 4.

Sounds like your code is just written incorrectly.

@tforster
Copy link

Is there a better/different implementation/option for unpipe? I am using it in one of my projects and it is preventing me from upgrading to vinyl-fs 4.

Sounds like your code is just written incorrectly.

How so? unpipe is a valid stream method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants