DEV Community

Discussion on: Design pattern: JS Functional Chains

Collapse
 
nokomoko profile image
nsmokon

but the reason it's not good for lodash is because the chain style API doesn't work well as a means of composing functions

Even though I agree that using functional piping is better than method chaining, can't you just literally add a new method to the API object in this example? Besides the main complain in that medium post seems to be about being unable to do tree shaking with this pattern.