GithubHelp home page GithubHelp logo

stream.pause()? about pause HOT 5 CLOSED

stream-utils avatar stream-utils commented on July 26, 2024
stream.pause()?

from pause.

Comments (5)

dougwilson avatar dougwilson commented on July 26, 2024

Yes, just use stream.pause() for standard readable streams these days. That didn't exist in 2010 when this module was made 👍

from pause.

jwalton avatar jwalton commented on July 26, 2024

I thought as much; ran into a reference to pause when I was reading the source to passport. Just wanted to make sure I wasn't crazy. :)

from pause.

dougwilson avatar dougwilson commented on July 26, 2024

Yep. It's certainly possible that it is useful still if there is something that emits data events but implements no way to pause them (of course without the thing allowing pause there is no backpressure as you observed). I don't think that is really the case these days, though. Passport has been around a very long time, so maybe it's just using this from it's own legacy roots, haha.

from pause.

jwalton avatar jwalton commented on July 26, 2024

Yeah, it's old code, and thankfully hidden behind an undocumented switch.

I've been writing in node since the 0.6 days. It still feels weird that Node 4 is end-of-life, and I can remove it from my travis.yml files, to be honest. :P

from pause.

dougwilson avatar dougwilson commented on July 26, 2024

Oh, haha. I took a look at the original PR that added it and it was around when 0.10 and streams2 came out. Looks like they rather have people use node 0.10+ than the switch anyway, which is probably why it's undocumented.

It's funny the only reason I took over this module was to make a release because of that npm change where it would warn on installing any package that didn't have a license defined in package.json haha.

from pause.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.