MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / normalizeLocale

Function normalizeLocale

tests/test_code/js/moment/moment.js:2040–2042  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

2038 }
2039
2040 function normalizeLocale(key) {
2041 return key ? key.toLowerCase().replace('_', '-') : key;
2042 }
2043
2044 // pick the locale from the array
2045 // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each

Callers 1

chooseLocaleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected