Skip to content

Commit 3f6aa4d

Browse files
committed
Fix camelization
1 parent c3ce2fa commit 3f6aa4d

File tree

3 files changed

+236
-48
lines changed

3 files changed

+236
-48
lines changed

dist/lib/String.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
value: true
1818
});
1919
var camelize = exports.camelize = function camelize(str) {
20-
return str.split(' ').map(function (word) {
20+
return str.split('_').map(function (word) {
2121
return word.charAt(0).toUpperCase() + word.slice(1);
2222
}).join('');
2323
};

src/lib/String.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const camelize = function(str) {
2-
return str.split(' ').map(function(word) {
2+
return str.split('_').map(function(word) {
33
return word.charAt(0).toUpperCase() + word.slice(1);
44
}).join('');
55
}

0 commit comments

Comments
 (0)