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

Add inflect.decapitalize() #6

Merged
merged 2 commits into from
Sep 20, 2012
Merged

Conversation

ikr
Copy link
Contributor

@ikr ikr commented Sep 19, 2012

A nice-to-have feature when converting, for example, database column names, which are often snake_case, to JSON object property names, which are often lower-camelCase.

"creation_timestamp".camelize().decapitalize() // creationTimestamp

I've added what looked to be necessary to both server- and client-side code and tests, mini-fied the client-side inflect.js with uglify-js. However couldn't figure out how to update ./docs automatically. You probably use some external script for that, — the HTML docs look auto-generated.

Plus, I've removed trailing spaces in the files I edited anyway. Hope you don't mind.

@MSNexploder
Copy link
Owner

Looks good to me. :) Thanks for the pull request.
Will merge and release a new version tomorrow.

@MSNexploder MSNexploder merged commit 7a9ea67 into MSNexploder:master Sep 20, 2012
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

Successfully merging this pull request may close these issues.

2 participants