[Extension][DataType] Write a user-friendly uniq() method for Array #1

Open
Jack12816 opened this Issue Aug 13, 2013 · 0 comments

Comments

Projects
None yet
2 participants
@Jack12816
Owner

Jack12816 commented Aug 13, 2013

Just rewrite the existing uniq method to better fit our needs:

  • User can pass an self-defined function as an strategy
  • Default implementation should work by stringifying all entries and sort them unique

The API should look like this:

Array.prototype.uniq = function([uniqFunction]){}

As an optional feature we can provide some basic variants of the
unique implementation under a namespace in Array.

Array.uniq.numbers = function(){}
Array.uniq.objects = function(){}

@ghost ghost assigned killmag10 Aug 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment