You may want to check out Prototype's "uniq" function.
http://prototypejs.org/api/array/uniq

... and to the core dev's.. maybe this deserves an alias?


TAG

On Jul 31, 2007, at 7:25 PM, Tom Anderson <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> I enhanced 1.4.3 for db.etree.org.  Among my changes is this, which I
> feel is useful enough to include with Core:
>
>   unique: function (){
>          var temp=new Array();
>         this.sort();
>         for(i=0;i<this.length;i++) {
>                 if(this[i]==this[i+1]) {continue}
>                 temp[temp.length]=this[i];
>         }
>         return temp;
>   },
>
> Thank you,
> Tom H Anderson
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to