Skip to content

compute unique

kgryte edited this page May 12, 2015 · 1 revision

Removes duplicate values to determine the subset containing all unique values of a numeric array.

var data = [ 2, 4, 2, 7, 3 ];

compute.unique( data );

If the input array is already sorted in ascending order, set the sorted flag to true.

Note: mutates the input array.

Clone this wiki locally