diffObjects (newObject, oldObject, opts) {
    opts || (opts = {})
    let equalsFn = opts.equalsFn
    const blacklist = opts.ignore
    const diff = {
      added: {},
      changed: {},
      removed: {}
    }
    if (!utils.isFunction(equalsFn)) {
      equalsFn = utils.deepEqual
    }

    const newKeys = Object.keys(newObject).filter(function (key) {
      return !utils.isBlacklisted(key, blacklist)
    })
    const oldKeys = Object.keys(oldObject).filter(function (key) {
      return !utils.isBlacklisted(key, blacklist)
    })

    // Check for properties that were added or changed
    newKeys.forEach(function (key) {
      const oldValue = oldObject[key]
      const newValue = newObject[key]
      if (equalsFn(oldValue, newValue)) {
        return
      }
      if (oldValue === undefined) {
        diff.added[key] = newValue
      } else {
        diff.changed[key] = newValue
      }
    })

    // Check for properties that were removed
    oldKeys.forEach(function (key) {
      const oldValue = oldObject[key]
      const newValue = newObject[key]
      if (newValue === undefined && oldValue !== undefined) {
        diff.removed[key] = undefined
      }
    })

    return diff
  }
Return a diff of the base object to the comparison object.

@example
import { utils } from 'js-data';
const oldObject = { foo: 'bar', a: 1234 };
const newObject = { beep: 'boop', a: 5678 };
const diff = utils.diffObjects(oldObject, newObject);
console.log(diff.added); // {"beep":"boop"}
console.log(diff.changed); // {"a":5678}
console.log(diff.removed); // {"foo":undefined}

@method utils.diffObjects
@param {object} newObject Comparison object.
@param {object} oldObject Base object.
@param {object} [opts] Configuration options.
@param {Function} [opts.equalsFn={@link utils.deepEqual}] Equality function.
@param {array} [opts.ignore=[]] Array of strings or RegExp of fields to ignore.
@returns {Object} The diff from the base object to the comparison object.
@see utils.areDifferent
@since 3.0.0