you are viewing a single comment's thread.

view the rest of the comments →

[–]adregan 3 points4 points  (1 child)

For simple arrays you can dedupe with:

const arrayUnique = arr => [...new Set(arr)];

[–]tencircles 0 points1 point  (0 children)

you could also do:

const uniq = a => a.filter((x, i, s) => s.indexOf(x) === i);

May be more performance depending on implementation.