这是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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ inflect.camelize = function(lower_case_and_underscored_word, first_letter_in_upp
if (first_letter_in_uppercase) {
return util.string.upcase(result);
} else {
return result;
return util.string.downcase(result);
}
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "i",
"version": "0.3.1",
"version": "0.3.2",
"author": "Pavan Kumar Sunkara <pavan.sss1991@gmail.com> (pksunkara.github.com)",
"description": "custom inflections for nodejs",
"main": "./lib/inflect",
Expand Down
1 change: 1 addition & 0 deletions test/inflector/cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
},
UnderscoreToLowerCamel: {
"product": "product",
"Widget": "widget",
"special_guest": "specialGuest",
"application_controller": "applicationController",
"area51_controller": "area51Controller"
Expand Down