gulpjs / async-done

Allows libraries to handle various caller provided asynchronous functions uniformly. Maps promises, observables, child processes and streams, and callbacks to callback style.
MIT License
70 stars 21 forks source link

allow passing options to `end-of-stream`? #26

Closed tunnckoCore closed 9 years ago

tunnckoCore commented 9 years ago

Allow modify/extend options that have been passed to eos?

phated commented 9 years ago

I thought about this but I think it clutters the API if put in the function signature. Maybe it could be attached as a static property to the exported function? That seems worse. I could create a submodule that exports the config as an object and it could be altered by a consuming library... Hmm.

tunnckoCore commented 9 years ago

it clutters the API if put in the function signature.

I don't think so, it's natural. And it's not hard to be implemented. It will just work.

That seems worse.

:+1:

Everything different from optional options object which would be able to be extended/modified, seems worse to me. lol.

phated commented 9 years ago

I don't think I am going to expose these. This is an opinionated module and I might switch out end-of-stream in the future. I don't want to adopt their API into mine.