Skip to content

Commit a1f146d

Browse files
authored
Handle underscore events
All multi-word events are separated by an underscore instead of a space.
1 parent c70a04f commit a1f146d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)