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

Function select

ark/schema/shared/render.ts:56–66  ·  view source on GitHub ↗
(config: ResolvedConfig)

Source from the content-addressed store, hash-verified

54 !("cite" in config.locale)
55
56const select = (config: ResolvedConfig): Locale.Resolved => {
57 if (isStandalone(config)) return config.locale
58 if (selector === undefined) return configured
59 try {
60 const locale = selector()
61 return locale === undefined ? defaultLocale : normalizeLocale(locale)
62 } catch {
63 // a throw from a read would replace the TraversalError assert throws
64 return defaultLocale
65 }
66}
67
68const write = (
69 error: ArkError,

Callers

nothing calls this directly

Calls 2

normalizeLocaleFunction · 0.85
isStandaloneFunction · 0.70

Tested by

no test coverage detected