X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Fbetterjs.js;h=30ca5ad70f9fc6f33c4a9a28f2fc4a1b74e128ab;hp=d7ceb8e2b8c35c7bf83f2267e7069ff5c21404ab;hb=6c0fcdfaefd072f8b0ee1d7d8f1ba2a2c1ede8ec;hpb=4dfbbcf0f54cb3eb70856ea404d9ecef6aec5e26 diff --git a/js/betterjs.js b/js/betterjs.js index d7ceb8e..30ca5ad 100644 --- a/js/betterjs.js +++ b/js/betterjs.js @@ -33,22 +33,21 @@ Array.prototype.each = function(f) { Array.prototype.map = function(f) { for (var i = 0; i < this.length; i++) { - this[i] = f(this[i]) + this[i] = f(this[i]); } }; String.prototype.trim = function() { - return jQuery.trim(this) // anciennement : this.replace(/^\s+|\s+$/g, ""); + return jQuery.trim(this); // anciennement : this.replace(/^\s+|\s+$/g, ""); } String.prototype.ltrim = function() { return this.replace(/^\s+/, ""); -} +}; String.prototype.rtrim = function() { return this.replace(/\s+$/, ""); -} - +}; /** * Voir : http://www.coolpage.com/developer/javascript/Correct%20OOP%20for%20Javascript.html