import { Country } from '../../data/countries';

export const longestMatchingPrefix = (matchingCodes: readonly Country[]) =>
  matchingCodes.reduce((a, b) => (a.phone.length > b.phone.length ? a : b));
