• This project
    • Loading...
  • Sign in

fe / yohobuywap-node · Files

Go to a project

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Pipelines 0
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • Create a new issue
  • yohobuywap-node
  • utils
  • address-process.js
  • change-order-address
    91a7bc49
    by 郭成尧
    2017-03-02 15:03:31 +0800  
    Browse Files
address-process.js 298 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/**
 * 地址处理
 */

const _ = require('lodash');

const getAddressByAreaCode = (areaCode, addressList) => {
    return _.find(addressList, function(address) {
        return parseInt(address.area_code, 10) === parseInt(areaCode, 10);
    });
};

module.exports = {
    getAddressByAreaCode
};