lib/Map/GnafAddressGeocoder.js
function prefilterAddresses(addressList) {
  var addressesPlusInd = { skipIndices: [], nullAddresses: 0, addresses: [] };

  for (var i = 0; i < addressList.length; i++) {
    var address = addressList[i];
    if (address === null) {
      addressesPlusInd.skipIndices.push(i);
      addressesPlusInd.nullAddresses++;
      continue;
    }
    if (
      address.toLowerCase().indexOf("po box") !== -1 ||
      address.toLowerCase().indexOf("post office box") !== -1
    ) {
      addressesPlusInd.skipIndices.push(i);
      continue;
    }
    addressesPlusInd.addresses.push(address);
  }
  return addressesPlusInd;
}
function prefilterAddresses(addressList) {
  var addressesPlusInd = { skipIndices: [], nullAddresses: 0, addresses: [] };

  for (var i = 0; i < addressList.length; i++) {
    var address = addressList[i];
    if (address === null) {
      addressesPlusInd.skipIndices.push(i);
      addressesPlusInd.nullAddresses++;
      continue;
    }
    if (
      address.toLowerCase().indexOf("po box") !== -1 ||
      address.toLowerCase().indexOf("post office box") !== -1
    ) {
      addressesPlusInd.skipIndices.push(i);
      continue;
    }
    addressesPlusInd.addresses.push(address);
  }
  return addressesPlusInd;
}
function prefilterAddresses ( addressList ) { var addressesPlusInd = { skipIndices : [ ] , nullAddresses : 0 , addresses : [ ] } ; for ( var i = 0 ; i < addressList . length ; i ++ ) { var address = addressList [ i ] ; if ( address === null ) { addressesPlusInd . skipIndices . push ( i ) ; addressesPlusInd . nullAddresses ++ ; continue ; } if ( address . toLowerCase ( ) . indexOf ( "po box" ) !== - 1 || address . toLowerCase ( ) . indexOf ( "post office box" ) !== - 1 ) { addressesPlusInd . skipIndices . push ( i ) ; continue ; } addressesPlusInd . addresses . push ( address ) ; } return addressesPlusInd ; }
Do not try to geocode addresses that don't look valid.

@param {Array} addressList List of addresses that will be considered for geocoding
@return {Object} Probably shorter list of addresses that should be geocoded, as well as indices of addresses that
were removed.
@private
Do not try to geocode addresses that don t look valid .