As we all know, lodash-es is built with a more modular syntax for supporting tree shaking by build tools.
However, chain related features means some functions are attached to a object/prototype chain.
I can see chain is published with lodash-es, but I am not sure how to use it with proper imports with other chained method.
A usecase may look like this:
import { chain } from 'lodash-es'
export function double(input) {
return chain(input)
.without(null)
.map(val => val * 2)
.value()
.join(', ')
}
Edit #1:
The point is not about how is chain imported, but about how are other chained functions imported.