import iso , { Country } from './iso-3166' ; param { string } name returns { Country | undefined } export const whereCountry = ( name ) : Country | undefined => { return iso . find ( ( country ) => country . country . toUpperCase ( ) === name . toUpperCase ( ) ) ; } ; param { string } alpha2 returns { Country | undefined } export const whereAlpha2 = ( alpha2 ) : Country | undefined => { return iso . find ( ( country ) => country . alpha2 === alpha2 . toUpperCase ( ) ) ; } ; param { string } alpha3 returns { Country | undefined } export const whereAlpha3 = ( alpha3 ) : Country | undefined => { return iso . find ( ( country ) => country . alpha3 === alpha3 . toUpperCase ( ) ) ; } ; param { string | number } numeric returns { Country | undefined } export const whereNumeric = ( numeric ) : Country | undefined => { return iso . find ( ( country ) => country . numeric === String ( numeric ) ) ; } ; returns { Array < Country > } export const all = ( ) : Country [ ] => iso ; export default { all , whereCountry , whereAlpha2 , whereAlpha3 , whereNumeric , } ;