src/components/extractFields.js
function getAbbr(wofData) {
  const iso2 = getPropertyValue(wofData, 'wof:country');

  // sometimes there are codes set to XX which cause an exception so check if it's a valid ISO2 code
  if (iso2 !== false && iso3166.is2(iso2)) {
    return iso3166.to3(iso2);
  }

  return null;
}
function getAbbr(wofData) {
  const iso2 = getPropertyValue(wofData, 'wof:country');

  // sometimes there are codes set to XX which cause an exception so check if it's a valid ISO2 code
  if (iso2 !== false && iso3166.is2(iso2)) {
    return iso3166.to3(iso2);
  }

  return null;
}
function getAbbr ( wofData ) { const iso2 = getPropertyValue ( wofData , 'wof:country' ) ; // sometimes there are codes set to XX which cause an exception so check if it's a valid ISO2 code if ( iso2 !== false && iso3166 . is2 ( iso2 ) ) { return iso3166 . to3 ( iso2 ) ; } return null ; }
Return the ISO3 country code where available

@param {object} wofData
@returns {null|string}
Return the ISO3 country code where available