-
Notifications
You must be signed in to change notification settings - Fork 297
Remove lodash.reduce, lodash.camelCase #166
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
Conversation
, ''); | ||
} | ||
|
||
export default actionType => actionType.split(namespacer).map(camelCase).join(namespacer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use the camelCase function from sindresorhus: https://github.com/sindresorhus/camelcase
We could also put this file into a utils
folders.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't look like it honors delimiters like /
. From the PR description
Also, I think it's useful to allow / when camel-casing (and not remove it). This would give users the ability to write namespaced actions (via helper code, e.g.) as in #159.
Honoring delimiters like /
would make libraries such as https://github.com/yangmillstheory/redux-nested-actions useful.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for me. We should only look if we really covered every possible case.
This reverts commit 4263c44.
What is the progress on this? Looks good. |
Sorry about the delay! I agree this is mostly done, I'll update this and ship tonight. |
https://github.com/acdlite/redux-actions/releases/tag/1.2.1 @ruiaraujo thanks for moving this along |
Going from
to
Also, I think it's useful to allow
/
when camel-casing (and not remove it). This would give users the ability to write namespaced actions (via helper code, e.g.) as in #159.