classify.js 278 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 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, '')); };