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

Function meet

ark/schema/shared/inPlace.ts:49–55  ·  view source on GitHub ↗
(l: Keys, r: Keys)

Source from the content-addressed store, hash-verified

47 key === "length" || (typeof key === "string" && arrayIndexMatcher.test(key))
48
49const meet = (l: Keys, r: Keys): boolean => {
50 if ((l.every && !isEmpty(r)) || (r.every && !isEmpty(l))) return true
51 if (l.indices && (r.indices || [...r.named].some(isIndexKey))) return true
52 if (r.indices && [...l.named].some(isIndexKey)) return true
53 for (const key of l.named) if (r.named.has(key)) return true
54 return false
55}
56
57const canBeObject = (node: BaseRoot): boolean =>
58 node.overlaps($ark.kw.object.internal)

Callers 1

writesUnreadFunction · 0.70

Calls 2

isEmptyFunction · 0.70
hasMethod · 0.45

Tested by

no test coverage detected