'use strict';

var lodashEs = require('lodash-es');

const keysOf = (arr) => Object.keys(arr);
const hasOwnProperty = Object.prototype.hasOwnProperty;
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
const resetObject = (oldObj, newObj) => {
  for (const [key, value] of Object.entries(newObj)) {
    if (hasOwn(oldObj, key)) {
      Reflect.set(oldObj, key, value);
    }
  }
};
function getModifiedData(originalData, formData) {
  const modifiedData = {};
  for (const key in formData) {
    if (Object.prototype.hasOwnProperty.call(formData, key)) {
      if (!lodashEs.isEqual(formData[key], originalData[key])) {
        modifiedData[key] = formData[key];
      }
    }
  }
  return modifiedData;
}

exports.getModifiedData = getModifiedData;
exports.hasOwn = hasOwn;
exports.keysOf = keysOf;
exports.resetObject = resetObject;
//# sourceMappingURL=objects.js.map
