"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = createChains;

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));

function createChains(newProps, oldProps) {
  var chains = {};
  Object.keys(newProps).forEach(function (key) {
    var value = newProps[key];
    var oldValue = oldProps[key];

    if (typeof value === 'function' && typeof oldValue === 'function') {
      chains[key] = function () {
        value.apply(void 0, arguments);
        return oldValue.apply(void 0, arguments);
      };
    }
  });
  return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, newProps), chains);
}
//# sourceMappingURL=createChains.js.map
