[
https://issues.apache.org/jira/browse/SLING-7524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16383691#comment-16383691
]
Tomek Rękawek commented on SLING-7524:
--------------------------------------
[~jebailey] - thanks for noticing this. Indeed, the name is a big misleading
and the method has different semantics than the jQuery unique(). I'm not sure
if we can change the implementation here - I think the global unique() would
require sorting the collection, which would break the "laziness" and I'd like
to avoid this.
How about deprecating the unique() and renaming it to, I don't know,
deduplicate()?
> Sling Query - unique function does not not remove all duplicates
> ----------------------------------------------------------------
>
> Key: SLING-7524
> URL: https://issues.apache.org/jira/browse/SLING-7524
> Project: Sling
> Issue Type: Improvement
> Components: Sling Query
> Reporter: Jason E Bailey
> Assignee: Jason E Bailey
> Priority: Major
>
> the function for unique does not match the contract a unique function usually
> provides including JQuery, rather it's providing a sequential deduplicator.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)