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

Function entryOf

ark/aot/pluginCalls.ts:121–127  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

119}
120
121const entryOf = (node: Node): string | undefined => {
122 const source = loadedSourceOf(node)
123 const specifier = source && literalOf(source)
124 return typeof specifier === "string" && specifier in entries ?
125 specifier
126 : undefined
127}
128
129// e.g. ["precompile", "vite"] for `precompile.vite`, `aot.precompile.vite` or
130// `require("@ark/aot/unplugin").precompile.vite`

Callers 2

callsInFunction · 0.85
entryReadOfFunction · 0.85

Calls 2

loadedSourceOfFunction · 0.90
literalOfFunction · 0.70

Tested by

no test coverage detected