8 lines
207 B
JavaScript
8 lines
207 B
JavaScript
![]() |
var makeString = require('./helper/makeString');
|
||
|
|
||
|
module.exports = function titleize(str) {
|
||
|
return makeString(str).toLowerCase().replace(/(?:^|\s|-)\S/g, function(c) {
|
||
|
return c.toUpperCase();
|
||
|
});
|
||
|
};
|