You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
370 B
16 lines
370 B
var splitCase = require('./splitCase');
|
|
exports = function(str) {
|
|
var arr = splitCase(str);
|
|
var ret = arr[0];
|
|
arr.shift();
|
|
arr.forEach(capitalize, arr);
|
|
ret += arr.join('');
|
|
return ret;
|
|
};
|
|
function capitalize(val, idx) {
|
|
this[idx] = val.replace(/\w/, function(match) {
|
|
return match.toUpperCase();
|
|
});
|
|
}
|
|
|
|
module.exports = exports;
|
|
|