jamesmcnamara / shades

A lodash-inspired lens-like library for Javascript
MIT License
413 stars 14 forks source link

export compose function #44

Closed ptpaterson closed 2 years ago

ptpaterson commented 4 years ago

compose is not exported, but I think it would be helpful to have available for building custom lenses.

In my case, I am using custom lenses to build database queries. I have a prop lens, and also a path that is the composition of multiple props. Since I cannot just use default compiled props, I end up with get(prop('one'), prop('two'), /.../) so it's nicer to compose them behind the scenes: get(path('one', 'two'), /.../))

jamesmcnamara commented 2 years ago

Exported in shades@2.2