address-process.js
298 Bytes
/**
* 地址处理
*/
const _ = require('lodash');
const getAddressByAreaCode = (areaCode, addressList) => {
return _.find(addressList, function(address) {
return parseInt(address.area_code, 10) === parseInt(areaCode, 10);
});
};
module.exports = {
getAddressByAreaCode
};