Node.js examples for String:Case
Converts underscored or add dash string to a camelized one
/**//from ww w .j a va2 s .c o m * converts underscored or dasherized string to a camelized one * @returns String camelized version */ camelize: function() { return this.replace(/(\-|_)+(.)?/g, function(match, dash, chr) { return chr ? chr.toUpperCase() : ''; }); },