Skip to content

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

Jack12816 opened this Issue Aug 13, 2013 · 0 comments

2 participants


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(){}
@killmag10 killmag10 was assigned Aug 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.