anorgatarrak-wordpress-theme/node_modules/underscore.string/titleize.js

8 lines
207 B
JavaScript
Raw Normal View History

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