"use strict";

exports.__esModule = true;
exports["default"] = void 0;
var _recompose = require("recompose");
var _lodash = _interopRequireDefault(require("lodash"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var isEq = function isEq(o1, o2) {
  var isEq = _lodash["default"].isEqualWith(o1, o2, function (val1, val2) {
    if (_lodash["default"].isFunction(val1) && _lodash["default"].isFunction(val2)) {
      return val1 === val2 || val1.toString() === val2.toString();
    }
  });
  return isEq;
};
var pure = function pure(BaseComponent) {
  var hoc = (0, _recompose.shouldUpdate)(function (props, nextProps) {
    return !isEq(props, nextProps);
  });
  return hoc(BaseComponent);
};
var _default = pure;
exports["default"] = _default;
module.exports = exports.default;