A simple man. I like to build cool things, work with nice people and help others where I can. Currently I'm an engineering manager for a fintech startup and historically a serial founder & freelancer.
Location
München, Deutschland 🇩🇪
Education
The Open University
Work
Engineering Manager @ Deutsche Fintech Solutions GmbH
I updated the check because actually the jsdoc expects just an array of functions to be in the fns variable and so I updated the code accordingly, open to feedback but I think this is cleaner either way. I also added your extra test with some modifications to the article.
Looks good to me! Now it's consistent.
The spread operator can also be used when calling pipe, like pipe(...[f1, f2], ...[f3, f4], f5), so if you know for sure there will be an array (or arrays) of functions to input, that's still possible this way.
A simple man. I like to build cool things, work with nice people and help others where I can. Currently I'm an engineering manager for a fintech startup and historically a serial founder & freelancer.
Location
München, Deutschland 🇩🇪
Education
The Open University
Work
Engineering Manager @ Deutsche Fintech Solutions GmbH
A simple man. I like to build cool things, work with nice people and help others where I can. Currently I'm an engineering manager for a fintech startup and historically a serial founder & freelancer.
Location
München, Deutschland 🇩🇪
Education
The Open University
Work
Engineering Manager @ Deutsche Fintech Solutions GmbH
I updated the check because actually the jsdoc expects just an array of functions to be in the
fns
variable and so I updated the code accordingly, open to feedback but I think this is cleaner either way. I also added your extra test with some modifications to the article.Looks good to me! Now it's consistent.
The spread operator can also be used when calling pipe, like
pipe(...[f1, f2], ...[f3, f4], f5)
, so if you know for sure there will be an array (or arrays) of functions to input, that's still possible this way.Exactly. Appreciate the input though! 👍
Exactly which still matches the initial intention anyway and keeps things more consistent too.