import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["init"];
import isPlainObject from "lodash/isPlainObject";
export default function loadMethods(target, source) {
  if (!source || !isPlainObject(source)) {
    return;
  }
  var init = source.init,
    srcMethods = _objectWithoutPropertiesLoose(source, _excluded);

  // eslint-disable-next-line guard-for-in,no-restricted-syntax
  for (var methodName in srcMethods) {
    target[methodName] = source[methodName];
  }
  if (typeof init === 'function') {
    init.call(target);
  }
}