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

Function read

ark/type/standalone/units.ts:103–109  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

101 const sourcesByName = new Map(members)
102 const called = new Set<string>()
103 const read = (text: string) => {
104 for (const name of text.match(/[\w$]+/g) ?? []) {
105 if (called.has(name) || !sourcesByName.has(name)) continue
106 called.add(name)
107 read(sourcesByName.get(name)!)
108 }
109 }
110 for (const reader of readers) read(reader)
111 return members.filter(([name]) => called.has(name))
112}

Callers 1

calledMembersOfFunction · 0.70

Calls 4

matchMethod · 0.80
getMethod · 0.65
hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected