UNPKG

@aegenet/belt-array-duplicates

Version:

Strip duplicates from array / get duplicates of an array.

13 lines (10 loc) 361 B
/** Return array without duplicates elements */ declare function stripDuplicates<T = unknown>(dupArray: T[], options?: { compare?: (a: T, b: T) => boolean; sorted?: boolean; }): T[]; /** * Retrieves duplicates from a collection of numbers */ declare function getDuplicates(collection: number[]): number[]; export { getDuplicates, stripDuplicates };