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

Function caseOf

ark/aot/settingsValidators.ts:898–903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

896var domains = (cases, description = describeDomains(cases), fails) => {
897 const site = { code: "discriminant", description }
898 const caseOf = data =>
899 cases[
900 data === null ? "null"
901 : typeof data === "function" ? "object"
902 : typeof data
903 ]
904 const checker = (data, ctx) => {
905 const branch = caseOf(data)
906 return branch ?

Callers 2

checkerFunction · 0.70
domainsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected