"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const basic = require("./basic.js");
const { hasOwnProperty } = Object.prototype;
function assignKey(to, from, key) {
  const val = from[key];
  if (!basic.isDef(val)) {
    return;
  }
  if (!hasOwnProperty.call(to, key) || !basic.isObject(val)) {
    to[key] = val;
  } else {
    to[key] = deepAssign(Object(to[key]), val);
  }
}
function deepAssign(to, from) {
  Object.keys(from).forEach((key) => {
    assignKey(to, from, key);
  });
  return to;
}
exports.deepAssign = deepAssign;
