(localeToMatch, includedLocale)
| 30 | }; |
| 31 | |
| 32 | function localeMatches(localeToMatch, includedLocale) { |
| 33 | return ( |
| 34 | localeToMatch.language === includedLocale.language && |
| 35 | (!includedLocale.region || localeToMatch.region === includedLocale.region) |
| 36 | ); |
| 37 | } |