Node.js examples for String:Case
Converts a camelized or dasherized string into an underscored one
/**//from w ww . j a va 2 s. co m * converts a camelized or dasherized string into an underscored one * @return String underscored version */ underscored: function() { return this.replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/\-/g, '_').toLowerCase(); },