Giter Site home page Giter Site logo

mississippi's Issues

cut new release?

Heads up: Although documented, parallel is not being exported in the current 1.3.0 version.

Promise-friendly API?

Would you accept a PR that introduces a Promise-friendly API in addition to existing callback API?

E.g. if a callback argument is omitted, a Promise is returned:

miss.pipe(stream1, stream2, stream3).then(...).catch(...)

but the callback way would still work:

miss.pipe(stream1, stream2, stream3, cb)

Stream segment index

It would be great to start a stream segment index, highlighting some of the more useful stream segments that are out there. Is there an awesome streams that already exists? Would that work well? Would an editorialised version work better?

Typescript Types?

This looks like a really handly little toolkit for dealing with some of the oddities of node streams. I'd love to use it with Typescript, any interest in a type file?

Consider adding pump-chain to the collection?

Hey @maxogden !

I made a tiny module that is similar to pump called pump-chain, but instead of having a callback as the last parameter it bubbles the error from the intermediate streams to the last stream. This is useful when you module pipes multiple streams together and returns an outer stream for end-users to consume.

My real-world use cases for this module: spawning git child_process | parse output | return outer stream. (see 'git-' modules from https://github.com/alessioalex?tab=repositories click on 'sources').

Let me know if you think this is useful. Thanks

pump & concat error handler question

Hi!
I refer to the repo all the time; It's great. thanks! Hope this general streams question is OK.

I noticed that if you pipe/pump into concat-stream, and an error happens before any data passes,
concat's callback gets called before pipe's error handler.

So concat's callback gets an empty object, but I don't know if that means "there was no data" or "there was an error". I guess in this instance I'd like to be able to process.exit(1) from the error handler before processing the data, but I could see how in some cases you'd want it the other way around.

Am I using something wrong? Any tricks?

var fs = require('fs')
var miss = require('mississippi')

miss.pipe(
  fs.createReadStream('./nofile'),
  miss.concat(function (result) {
    console.log('concat', result)
  }),
  function () {
    console.log('error handler')
  }
)
concat 
error handler

Add from2?

from2 seems generalizable enough to add to this collection. What do ya'll think? I can PR the work involved if it fits.

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.