/**
 * Created by baoyinghai on 4/22/17.
 */
import { filterEmptyValue } from './EmptyUtils';

export const getParamByBindParameters = (allParams, bindParameters = []) => {
  if (!bindParameters || !allParams) return {};
  return bindParameters.reduce((ret, item) => {
    ret[item.name] = filterEmptyValue(item.value, allParams[item.name]);
    return ret;
  }, {});
};
