react-native-country-codes-picker
Version:
This lib. provide country iso picker with search functionality
9 lines (7 loc) • 349 B
text/typescript
import {countryCodes} from "../constants/countryCodes";
import {CountryItem} from "../types/Types";
export const countriesRemover = (excludedCountries: string[]|undefined): CountryItem[] => {
return countryCodes?.filter(country => {
return !(excludedCountries?.find(short => country?.code === short?.toUpperCase()));
});
};