third_party/polymer3/bower_components/polymer/lib/mixins/mutable-data.js
function mutablePropertyChange(inst, property, value, old, mutableData) {
  let isObject;
  if (mutableData) {
    isObject = (typeof value === 'object' && value !== null);
    // Pull `old` for Objects from temp cache, but treat `null` as a primitive
    if (isObject) {
      old = inst.__dataTemp[property];
    }
  }
  // Strict equality check, but return false for NaN===NaN
  let shouldChange = (old !== value && (old === old || value === value));
  // Objects are stored in temporary cache (cleared at end of
  // turn), which is used for dirty-checking
  if (isObject && shouldChange) {
    inst.__dataTemp[property] = value;
  }
  return shouldChange;
}
function mutablePropertyChange(inst, property, value, old, mutableData) {
  let isObject;
  if (mutableData) {
    isObject = (typeof value === 'object' && value !== null);
    // Pull `old` for Objects from temp cache, but treat `null` as a primitive
    if (isObject) {
      old = inst.__dataTemp[property];
    }
  }
  // Strict equality check, but return false for NaN===NaN
  let shouldChange = (old !== value && (old === old || value === value));
  // Objects are stored in temporary cache (cleared at end of
  // turn), which is used for dirty-checking
  if (isObject && shouldChange) {
    inst.__dataTemp[property] = value;
  }
  return shouldChange;
}
function mutablePropertyChange ( inst , property , value , old , mutableData ) { let isObject ; if ( mutableData ) { isObject = ( typeof value === 'object' && value !== null ) ; // Pull `old` for Objects from temp cache, but treat `null` as a primitive if ( isObject ) { old = inst . __dataTemp [ property ] ; } } // Strict equality check, but return false for NaN===NaN let shouldChange = ( old !== value && ( old === old || value === value ) ) ; // Objects are stored in temporary cache (cleared at end of // turn), which is used for dirty-checking if ( isObject && shouldChange ) { inst . __dataTemp [ property ] = value ; } return shouldChange ; }
Common implementation for mixin & behavior
Common implementation for mixin & behavior