this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Anything Intl always need to extract out

and memoized

+10 -4
+10 -4
src/utils/localeCode2Text.jsx
··· 1 - export default function localeCode2Text(code) { 1 + import mem from './mem'; 2 + 3 + const IntlDN = new Intl.DisplayNames(navigator.languages, { 4 + type: 'language', 5 + }); 6 + 7 + function _localeCode2Text(code) { 2 8 try { 3 - return new Intl.DisplayNames(navigator.languages, { 4 - type: 'language', 5 - }).of(code); 9 + return IntlDN.of(code); 6 10 } catch (e) { 7 11 console.error(e); 8 12 return null; 9 13 } 10 14 } 15 + 16 + export default mem(_localeCode2Text);