MCPcopy
hub / github.com/crafter-station/petdex / hasLocale

Function hasLocale

src/i18n/config.ts:7–9  ·  view source on GitHub ↗
(locale: string)

Source from the content-addressed store, hash-verified

5export const defaultLocale: Locale = "en";
6
7export function hasLocale(locale: string): locale is Locale {
8 return locales.includes(locale as Locale);
9}
10
11export function localizePath(locale: string, pathname: string): string {
12 if (!hasLocale(locale) || locale === defaultLocale) return pathname;

Callers 15

SurprisePetCardFunction · 0.90
LocaleSwitcherInnerFunction · 0.90
UserDropdownContentFunction · 0.90
SiteHeaderFunction · 0.90
MobileHeaderMenuFunction · 0.90
request.tsFile · 0.90
generateMetadataFunction · 0.90
generateMetadataFunction · 0.90
LocaleLayoutFunction · 0.90
generateMetadataFunction · 0.90
PetPageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected