Added function for later testing.

This commit is contained in:
Thomas Tanghus 2012-02-13 13:02:54 +01:00
parent 3c52ac7af3
commit 024405e4f1
1 changed files with 15 additions and 0 deletions

View File

@ -3,6 +3,21 @@ function ucwords (str) {
return $1.toUpperCase(); return $1.toUpperCase();
}); });
} }
/* TODO: Test this.
* http://snipplr.com/view/45323/remove-duplicate-values-from-array/
Array.prototype.unique = function unique() {
var i = 0;
while (i < this.length) {
var current = this[i];
for (k = this.length; k > i; k--) {
if (this[k] === current) {
this.splice(k,1);
}
} i++;
}
return this;
}
*/
String.prototype.strip_tags = function(){ String.prototype.strip_tags = function(){
tags = this; tags = this;