MCPcopy Create free account
hub / github.com/arktypeio/arktype / arrayEquals

Function arrayEquals

ark/util/arrays.ts:356–366  ·  view source on GitHub ↗
(
	l: array<element>,
	r: array<element>,
	opts?: ComparisonOptions<element>
)

Source from the content-addressed store, hash-verified

354 }, {}) as never
355
356export const arrayEquals = <element>(
357 l: array<element>,
358 r: array<element>,
359 opts?: ComparisonOptions<element>
360): boolean =>
361 l.length === r.length &&
362 l.every(
363 opts?.isEqual ?
364 (lItem, i) => opts.isEqual!(lItem, r[i])
365 : (lItem, i) => lItem === r[i]
366 )
367
368export type validateExhaustiveKeys<
369 keys extends readonly PropertyKey[],

Callers 5

candidateAtFunction · 0.90
nodesEqualFunction · 0.90
sameTransformsFunction · 0.90
sameMorphsFunction · 0.90
sameMorphsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected