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

Function entry

ark/repo/bench/bundle.ts:67–77  ·  view source on GitHub ↗
(scenario: SizedScenario, library: SizedLibrary)

Source from the content-addressed store, hash-verified

65}
66
67const entry = async (scenario: SizedScenario, library: SizedLibrary) =>
68 isStandalone(library) ? `export * from "./${scenario}/arktype.ts"`
69 : library in usageEntries ?
70 `export * from "./${scenario}/${library}.ts"\n${usageEntries[library]}`
71 : library === "typia" ?
72 `export * from "../out/typia/apps/${scenario}/typia.js"`
73 : library === "ajv" ? await ajvModule(scenario)
74 : library === "zodCompiled" ?
75 // zod's global mode compiles each schema at its first parse
76 `import "zod/compile"\nexport * from "./${scenario}/zod.ts"`
77 : `export * from "./${scenario}/${library}.ts"`
78
79// whether a library has the app a scenario's entry reads
80export const hasApp = (

Callers 1

bundleFunction · 0.70

Calls 2

ajvModuleFunction · 0.85
isStandaloneFunction · 0.70

Tested by

no test coverage detected