Changes between Initial Version and Version 9 of Ticket #9205


Ignore:
Timestamp:
Mar 12, 2013, 10:45:41 PM (7 years ago)
Author:
bill
Comment:

I think this will be handled in 2.0 if we base it on Lo-Dash, but otherwise perhaps worthwhile adding manually.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9205

    • Property Cc Eugene Lazutkin added
    • Property Component changed from Core to Dojox
    • Property Summary changed from Addition of array.unique to Dojo's array functions. to [patch/cla] Addition of array.unique to Dojo's array functions.
    • Property Milestone changed from tbd to 2.0
    • Property Owner changed from anonymous to Eugene Lazutkin
  • Ticket #9205 – Description

    initial v9  
    11I think a function to return the unique values of an array, analagous to array_unique in PHP, would be a useful addition to Dojo's excellent array additions.  It's a function I find regularly useful in other languages (and have just found a need for it in Javascript), and was surprised not to find it in Dojo. Code like
     2
     3{{{
    24thisModule.unique= function (/* Array */ mixedArray)
    35  {
     
    1315    return(uniqueArray);
    1416  }
     17}}}
    1518
    1619would seem to do it in an efficient way (this isn't my code, btw - http://blog.archive.jpsykes.com/212/unique-array-filter-in-dojo/index.htm).