'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getParamByBindParameters = undefined;

var _EmptyUtils = require('./EmptyUtils');

var getParamByBindParameters = exports.getParamByBindParameters = function getParamByBindParameters(allParams) {
  var bindParameters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];

  if (!bindParameters || !allParams) return {};
  return bindParameters.reduce(function (ret, item) {
    ret[item.name] = (0, _EmptyUtils.filterEmptyValue)(item.value, allParams[item.name]);
    return ret;
  }, {});
}; /**
    * Created by baoyinghai on 4/22/17.
    */