Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mixin with lodash-es #27

Open
fritx opened this issue Nov 9, 2022 · 0 comments
Open

mixin with lodash-es #27

fritx opened this issue Nov 9, 2022 · 0 comments

Comments

@fritx
Copy link

fritx commented Nov 9, 2022

Just found out a solution:
https://stackoverflow.com/questions/45462193/how-to-use-chain-with-lodash-es-while-supports-tree-shaking/72983877#72983877

Maybe should be added to documentation?

import lodashId from 'lodash-id'
import { mixin, chain, wrapperLodash } from 'lodash-es'

// doesn't work
mixin(lodashId)

// works
mixin(wrapperLodash, lodashId)

// test cases
console.log(chain([]).head)
console.log(chain([]).insert)
console.log(chain([]).insert({a:1}).value())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant