import Stack from "./_Stack.js";
import assignMergeValue from "./_assignMergeValue.js";
import baseFor from "./_baseFor.js";
import baseMergeDeep from "./_baseMergeDeep.js";
import isObject from "./isObject.js";
import keysIn from "./keysIn.js";
import safeGet from "./_safeGet.js";
function baseMerge(object, source, srcIndex, customizer, stack) {
  if (object === source) {
    return;
  }
  baseFor(source, function(srcValue, key) {
    stack || (stack = new Stack());
    if (isObject(srcValue)) {
      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
    } else {
      var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
      if (newValue === void 0) {
        newValue = srcValue;
      }
      assignMergeValue(object, key, newValue);
    }
  }, keysIn);
}
export {
  baseMerge as default
};
//# sourceMappingURL=_baseMerge.js.map
