这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

Ensure camelize respects first_letter_in_uppercase #2

Merged
merged 1 commit into from
Aug 4, 2013

Conversation

JedWatson
Copy link
Contributor

I have encountered an inconsistency in the camelize() method.

If it is passed a string with an UppercaseFirstLetter but the second argument first_letter_in_uppercase is passed in as false, result is returned without ensuring the first letter is lower-cased.

Although the main use case appears to be changing underscore_words to camelCase, I am using it to convert paths (e.g. My/Path/To/Something should become myPathToSomething) in which case the first word is not ensured to start with a lowercase letter.

This changeset fixes the issue, and I've added this to the test suite.

Hope you accept the change & update npm soon.

Thanks,
Jed.

pksunkara added a commit that referenced this pull request Aug 4, 2013
Ensure camelize respects first_letter_in_uppercase
@pksunkara pksunkara merged commit 78b0c76 into pksunkara:master Aug 4, 2013
@pksunkara
Copy link
Owner

I will push it soon.

@JedWatson
Copy link
Contributor Author

Thanks!

@pksunkara
Copy link
Owner

Published v0.3.2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants