src/index.js
function to2 (alpha3) {
    if (alpha3 && alpha3.length > 1) state = alpha3
    if (state.length !== 3) return state
    return ISOCodes.filter(function (row) {
      return row.alpha3 === state
    })[0].alpha2
  }
function to2 (alpha3) {
    if (alpha3 && alpha3.length > 1) state = alpha3
    if (state.length !== 3) return state
    return ISOCodes.filter(function (row) {
      return row.alpha3 === state
    })[0].alpha2
  }
function to2 ( alpha3 ) { if ( alpha3 && alpha3 . length > 1 ) state = alpha3 if ( state . length !== 3 ) return state return ISOCodes . filter ( function ( row ) { return row . alpha3 === state } ) [ 0 ] . alpha2 }
Convert an ISO 3166-1 alpha-3 code to alpha-2

@param  {String} alpha3 USA
@return {String}
Convert an ISO 3166 - 1 alpha - 3 code to alpha - 2