src/lib/entity.js
function getOptimalUpdate(component, implicit, reference) {
  if (equal(implicit, reference)) {
    return null;
  }
  if (isSingleProperty(component.schema)) {
    return reference;
  }
  var optimal = {};
  Object.keys(reference).forEach(function(key) {
    var needsUpdate = !equal(reference[key], implicit[key]);
    if (needsUpdate) {
      optimal[key] = reference[key];
    }
  });
  return optimal;
}
function getOptimalUpdate(component, implicit, reference) {
  if (equal(implicit, reference)) {
    return null;
  }
  if (isSingleProperty(component.schema)) {
    return reference;
  }
  var optimal = {};
  Object.keys(reference).forEach(function(key) {
    var needsUpdate = !equal(reference[key], implicit[key]);
    if (needsUpdate) {
      optimal[key] = reference[key];
    }
  });
  return optimal;
}
function getOptimalUpdate ( component , implicit , reference ) { if ( equal ( implicit , reference ) ) { return null ; } if ( isSingleProperty ( component . schema ) ) { return reference ; } var optimal = { } ; Object . keys ( reference ) . forEach ( function ( key ) { var needsUpdate = ! equal ( reference [ key ] , implicit [ key ] ) ; if ( needsUpdate ) { optimal [ key ] = reference [ key ] ; } } ) ; return optimal ; }
Returns the minimum value for a component with an implicit value to equal a
reference value. A `null` optimal value means that there is no need for an
update since the implicit value and the reference are equal.

@param {Component} component Component of the computed value.
@param {any}       implicit  The implicit value of the component.
@param {any}       reference The reference value for the component.
@return                      the minimum value making the component to equal
the reference value.
Returns the minimum value for a component with an implicit value to equal a reference value . A null optimal value means that there is no need for an update since the implicit value and the reference are equal .