Closed reklatsmasters closed 9 years ago
Thanks for the PR. Added to https://github.com/robrich/gulp-match/blob/master/index.js#L10
@robrich just wonder why that was not merged? Seems to be reasonable and useful for many cases.
@dfcreative: It was merged, just into a higher level module instead of here. Do you have a use-case where it's more helpful here instead?
Yes, I was going to use it at plotly here. Since codestyle policy is ES5, it is just uncomfy and redundant to create a whole function
when we have condition outputMinified
already.
That's a good reason. I'm thinking this will be even better:
if (typeof _condition === 'boolean') {
return _condition ? trueStream : falseStream;
}
See any issues with this short-cut?
@robirch makes perfect sense to me, unless condition is false
and falseStream
is undefined
- probably we should return original stream then?
Example: