MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / arraysEqual

Function arraysEqual

src/shared/utils/array.ts:16–18  ·  view source on GitHub ↗
(items1: T[], items2: T[])

Source from the content-addressed store, hash-verified

14}
15
16function arraysEqual<T>(items1: T[], items2: T[]) {
17 return items1.length === items2.length && items1.every((val, i) => val === items2[i]);
18}
19
20export function arrayStartsWith<T>(items1: T[], items2: T[]) {
21 return items1.length >= items2.length && arraysEqual(items1.slice(0, items2.length), items2);

Callers 2

arrayStartsWithFunction · 0.85
arrayContainsArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected