import deepEqual from "./deepEqual";
import keys from "./keys";
function intersection(a, b, isEqual = deepEqual) {
  const allKeys = [.../* @__PURE__ */ new Set([...keys(a), ...keys(b)])];
  return allKeys.reduce(
    (acc, k) => {
      if (isEqual(a[k], b[k]))
        acc[k] = a[k];
      else
        acc[k] = null;
      return acc;
    },
    {}
  );
}
export {
  intersection as default
};
//# sourceMappingURL=intersection.js.map