Active Name Version Description
Android An Open Handset Alliance Project
Axis2 1.3
CakePHP 1.2 Rapid Development Php Framework
CSS
Grails 1.x Groovy version of Ruby on Rails
Groovy 1.6 Object-oriented language alternative for Java platform
Hibernate v3 High performance object/relational persistence and query service
HTML 4.x
Java 6 6
Java EE 5 5
Javascript Javascript functions, classes, event handlers
jQuery The Write Less, Do More, JavaScript Library
JSON Java JSON in Java from json.org
MySQL
Perl 5.10.0
PHP 5.x
Prototype A widely used JavaScript Framework
Python 2.5
Python C 2.5
Python Lib 2.5
Rails 2.3.5 A framework for developing web applications according to MVC
Ruby 1.8.7 A dynamic, interpreted, open source programming language
SiteMesh
Spring Framework 2.5 Full-stack Java/JEE application framework
Struts 2 2.0.11.2
Trails Core 1.2.1 Domain driven development framework in the spirit of Ruby on Rails
Trails Hibernate 1.2.1
Trails Security 1.2.1
Trails Test 1.2.1
Xerces2 J 2.9.1
Quick search is faster, or start browsing by clicking on API title
    Array.uniq - Prototype JavaScript framework

    uniq

    uniq() -> newArray

    Produces a duplicate-free version of an array. If no duplicates are found, the original array is returned.

    Example

    
    ['Sam', 'Justin', 'Andrew', 'Dan', 'Sam'].uniq();
    // -> ['Sam', 'Justin', 'Andrew', 'Dan']
    
    ['Prototype', 'prototype'].uniq();
    // -> ['Prototype', 'prototype'] because String comparison is case-sensitive
    

    Performance considerations

    On large arrays with duplicates, this method has a potentially large performance cost:

    • Since it does not require the array to be sorted, it has quadratic complexity.
    • Since it relies on JavaScript’s Array.concat, it will yield a new, intermediary array every time it encounters a new value (a value that wasn’t already in the result array).

    More efficient implementations could be devised. This page will get updated if such an optimization is committed.