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

Support importing individual methods? #11

Open
owenoak opened this issue Feb 28, 2019 · 1 comment
Open

Support importing individual methods? #11

owenoak opened this issue Feb 28, 2019 · 1 comment

Comments

@owenoak
Copy link

owenoak commented Feb 28, 2019

One of the things I like about lodash is the ability to pull in individual methods rather than the whole lodash toolchain via:
`import isEqual from "lodash/isEqual"

For your project, the instructions state that you should _.mixin(...) to add inflector methods to lodash, but I never use lodash that way.

I quickly found that I could do:
import inflection from "lodash-inflection"
export const singularize = inflection.singularize.bind(inflection)
and it seems to be working fine.

So, my request is to add support to importing individual methods in a style similar to lodash, so:

import singularize from "lodash-inflection/singularize"
etc.

@danhper
Copy link
Owner

danhper commented Mar 13, 2019

Hi, I am not against this but I do not have time to do this now.
If you want to create a PR for this I will be more than happy to merge.
Thank you!

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

2 participants