]> source.dussan.org Git - nextcloud-server.git/commitdiff
Added function for later testing.
authorThomas Tanghus <thomas@tanghus.net>
Mon, 13 Feb 2012 12:02:54 +0000 (13:02 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Tue, 14 Feb 2012 00:00:41 +0000 (01:00 +0100)
apps/contacts/js/contacts.js

index 9071038b50af429adf82e397da397fc56e9926d2..d61489b63c30169dc827cd47af62c8772bcca084 100644 (file)
@@ -3,6 +3,21 @@ function ucwords (str) {
                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(){
        tags = this;