Otimização de string JavaScript

String.prototype.equals = function(value) { return this.valueOf() === value.valueOf();}String.prototype.endsWith = function(value) { return this.indexOf(suffix, this.length – value.length) !== -1;}String.prototype.startsWith = function(value) { return this.indexOf(value) === 0;}String.prototype.isEmail = function() { re = …

Continuar lendo