( locale: Locale<string> | LocaleSelector | undefined, base: ResolvedConfig )
| 35 | * passed, returning it if it isn't a function |
| 36 | */ |
| 37 | const configureLocale = ( |
| 38 | locale: Locale<string> | LocaleSelector | undefined, |
| 39 | base: ResolvedConfig |
| 40 | ): Locale.Resolved => { |
| 41 | defaultLocale = base.locale |
| 42 | if (typeof locale === "function") { |
| 43 | selector = locale |
| 44 | configured = defaultLocale |
| 45 | } else { |
| 46 | selector = undefined |
| 47 | configured = locale === undefined ? defaultLocale : normalizeLocale(locale) |
| 48 | } |
| 49 | return configured |
| 50 | } |
| 51 | |
| 52 | // a standalone runtime's locale is en's info alone, so it writes en even beside arktype |
| 53 | const isStandalone = (config: ResolvedConfig): boolean => |
no test coverage detected