Ticket #2527901 (closed enhancement)
ReporterMichael Hasenstein |
Opened: 05/13/09 Last modified: 09/19/12 Status: closed Type: enhancement Resolution: fixed |
Owner Dav Glass |
Target Release: 3.NEXT Priority: P3 (normal) |
|---|---|---|---|
| Summary: | Add parameter to Array.unique: an optional comparison function | ||
| Description: | Problem: Array.unique is useless for arrays of objects - UNLESS I can provide as an additional parameter a function to do the comparison, which if provided replaces the built-in default comparison. |
||
| Type: | enhancement | Observed in Version: | development master |
| Component: | YUI Global Object | Severity: | S3 (normal) |
| Assigned To: | Dav Glass | Target Release: | 3.NEXT |
| Location: | Library Code | Priority: | P3 (normal) |
| Tags: | Relates To: | ||
| Browsers: | N/A | ||
| URL: | |||
| Test Information: | |||
Change History
|
Posted: 05/14/09
|
|
Posted: 05/14/09
|
|
Posted: 04/20/11
|
|
Posted: 04/26/11
|
|
Posted: 05/13/11
|
|
Posted: 05/13/11
|
|
Posted: 09/13/11
|
|
Posted: 09/13/11
|
|
Posted: 04/9/12
|
|
Posted: 05/10/12
Array.unique(): remove deprecated sort param, add optional test function [Ticket #2527901] The sort parameter was deprecated back in 3.3.0. |
|
Posted: 05/15/12
|
|
Posted: 05/15/12
|
|
Posted: 09/19/12
|
George
I agree this is necessary. It'll probably have to wait for 3.5.0 though, because Y.Array.unique() currently supports a "sort" parameter that was silently deprecated in 3.3.0. I'll want to remove that param to make way for a comparator function param, but we'll need to message its pending removal at least one release ahead of time in case existing code depends on it.
We can do that messaging in 3.4.0, then replace the param in 3.5.0.