src/drivers/jquery/modules/o_O.support.js in eyeballs-0.4.2 vs src/drivers/jquery/modules/o_O.support.js in eyeballs-0.5.0

- old
+ new

@@ -59,13 +59,31 @@ callback(data, response); }); } } -if(typeof String.prototype.capitalize == 'undefined') +if(typeof String.prototype.capitalize === 'undefined') { String.prototype.capitalize = function(){ - return this.charAt(0).toUpperCase() + this.slice(1); + return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); + } +} + +if(typeof String.prototype.underscore === 'undefined') +{ + String.prototype.underscore = function(){ + return this.replace(/::/g, '/') + .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') + .replace(/([a-z\d])([A-Z])/g, '$1_$2') + .replace(/-/g, '_') + .toLowerCase(); + } +} + +if(typeof String.prototype.blank === 'undefined') +{ + String.prototype.blank = function(){ + return /^\s*$/.test(this); } } String.prototype.o_O_trim = function(chars) { return this.replace(new RegExp("(^[" + chars + "]+|[" + chars + "]+$)", "g"), '') \ No newline at end of file