Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

DRY camelcase #10337

Closed
wants to merge 3 commits into from
Closed

DRY camelcase #10337

wants to merge 3 commits into from

Conversation

cironunes
Copy link
Member

Instead of two camelCase methods (one for jqLite and other for ngAria) I'm suggesting to make the camelcase method public so that we can don't repeat ourselves.

@googlebot
Copy link

CLAs look good, thanks!

@petebacondarwin
Copy link
Contributor

Actually this is a bad bit of code in ngAria. The attr.$normalize method on the attr parameter to the link(scope, element, attr, ...) function provides the ability to convert between the canonical and original attribute names, so ngAria should not be using its own version of camelCase at all.

@cironunes - perhaps you could provide a fix for ngAria instead of this PR?

convert dash-separated strings to camelCase
remove the camelCase function from jqLite and use the one from the public API
remove the camelCase function and use the one from the public API
@cironunes
Copy link
Member Author

@petebacondarwin - I got it. But, don't you think that this camelCase method be public? Or at least moved from jqLite?

I'm going to work in the fix for ngAria them. Thanks for the feedback.

@gkalpak
Copy link
Member

gkalpak commented Dec 5, 2014

@petebacondarwin: Do we want to document $normalize or is it intentionally undocumented ?
Since it's named $normalize and not $$normalize I guess is should be documented (@cironunes: hint 😉).

@petebacondarwin
Copy link
Contributor

+1 @gkalpak

@cironunes
Copy link
Member Author

Here it is #10345

petebacondarwin pushed a commit that referenced this pull request Dec 5, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants