function isPlainObject(value) {
  return typeof value === "object" && value !== null;
}
function deepMerge(a, b, isLeaf = (v) => !isPlainObject(v)) {
  const result = {};
  for (const key of Object.keys(a)) {
    result[key] = a[key];
  }
  for (const key of Object.keys(b)) {
    const aVal = a[key];
    const bVal = b[key];
    if (key in a && !isLeaf(aVal) && !isLeaf(bVal)) {
      result[key] = deepMerge(
        aVal,
        bVal,
        isLeaf
      );
    } else {
      result[key] = bVal;
    }
  }
  return result;
}
export {
  deepMerge,
  isPlainObject
};
//# sourceMappingURL=deep-merge.js.map
