Combines the values of one or more arrays, removing duplicates
const v = Arrays.unique([ [1, 2, 3, 4], [ 3, 4, 5, 6] ]);// [ 1, 2, 3, 4, 5, 6] Copy
const v = Arrays.unique([ [1, 2, 3, 4], [ 3, 4, 5, 6] ]);// [ 1, 2, 3, 4, 5, 6]
A single array can be provided as well:
const v = Arrays.unique([ 1, 2, 3, 1, 2, 3 ]);// [ 1, 2, 3 ] Copy
const v = Arrays.unique([ 1, 2, 3, 1, 2, 3 ]);// [ 1, 2, 3 ]
By default uses JSON.toString() to compare values.
See also:
Default comparer function is equiv to checking a === b. Use isEqualValueDefault to compare by value, via comparing JSON string representation.
a === b
Combines the values of one or more arrays, removing duplicates
A single array can be provided as well:
By default uses JSON.toString() to compare values.
See also: