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

9 lines
278 B
JavaScript
Raw Normal View History

var capitalize = require('./capitalize');
var camelize = require('./camelize');
var makeString = require('./helper/makeString');
module.exports = function classify(str) {
str = makeString(str);
return capitalize(camelize(str.replace(/[\W_]/g, ' ')).replace(/\s/g, ''));
};