Return the unique elements of a list
$ npm install @f/unique
var unique = require('@f/unique')
unique([1,2,3,3]) // -> [1, 2, 3]
unique(['c', 'a', 'c']) // -> ['c', 'a']
arr
- Array of valuescmp
- Optional comparator to determine uniqueness
Returns: An array containing each unique value in arr
exactly once.
MIT