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

Function arrayStartsWith

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

Source from the content-addressed store, hash-verified

18}
19
20export function arrayStartsWith<T>(items1: T[], items2: T[]) {
21 return items1.length >= items2.length && arraysEqual(items1.slice(0, items2.length), items2);
22}
23
24export function arrayContainsArray<T>(haystack: T[], needle: T[]): boolean {
25 // Loop over valid starting points for the subarray

Callers 2

getOptionsFunction · 0.90
injectArgsMethod · 0.90

Calls 1

arraysEqualFunction · 0.85

Tested by

no test coverage detected