MCPcopy Create free account
hub / github.com/angular/angular / normalizeLocale

Function normalizeLocale

packages/core/src/i18n/locale_data_api.ts:183–185  ·  view source on GitHub ↗

* Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.

(locale: string)

Source from the content-addressed store, hash-verified

181 * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.
182 */
183function normalizeLocale(locale: string): string {
184 return locale.toLowerCase().replace(/_/g, '-');
185}

Callers 1

findLocaleDataFunction · 0.70

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected