mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-18 22:08:49 +01:00
13 lines
262 B
React
13 lines
262 B
React
|
import { match } from '@formatjs/intl-localematcher';
|
||
|
|
||
|
function localeMatch(...args) {
|
||
|
// Wrap in try/catch because localeMatcher throws on invalid locales
|
||
|
try {
|
||
|
return match(...args);
|
||
|
} catch (e) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default localeMatch;
|