9 lines
278 B
JavaScript
9 lines
278 B
JavaScript
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, ''));
|
|
};
|