MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / hasDuplicates

Function hasDuplicates

packages/core/utils/common.ts:155–157  ·  view source on GitHub ↗
(arr: Array<any>)

Source from the content-addressed store, hash-verified

153}
154
155export function hasDuplicates(arr: Array<any>): boolean {
156 return arr.length !== eliminateDuplicates(arr).length;
157}
158
159export function eliminateDuplicates(arr: Array<any>): Array<any> {
160 return Array.from(new Set(arr));

Callers 1

transformConverterFunction · 0.90

Calls 1

eliminateDuplicatesFunction · 0.85

Tested by

no test coverage detected