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

Function isPatternInstanceIn

ark/schema/units.ts:1159–1169  ·  view source on GitHub ↗
(node: BaseNode, value: RegExp)

Source from the content-addressed store, hash-verified

1157}
1158
1159const isPatternInstanceIn = (node: BaseNode, value: RegExp): boolean => {
1160 for (const id in node.byId) {
1161 const reference = node.byId[id]
1162 if (
1163 reference.is("pattern") &&
1164 (reference.instance === value || reference.tested === value)
1165 )
1166 return true
1167 }
1168 return false
1169}
1170
1171// a cycle's members are ordered by content
1172const nameComponent = (

Callers 1

serializeFunction · 0.85

Calls 1

isMethod · 0.80

Tested by

no test coverage detected