src/core/a-entity.js
function mergeComponentData (attrValue, extraData) {
  // Extra data not defined, just return attrValue.
  if (!extraData) { return attrValue; }

  // Merge multi-property data.
  if (extraData.constructor === Object) {
    return utils.extend(extraData, utils.styleParser.parse(attrValue || {}));
  }

  // Return data, precendence to the defined value.
  return attrValue || extraData;
}
function mergeComponentData (attrValue, extraData) {
  // Extra data not defined, just return attrValue.
  if (!extraData) { return attrValue; }

  // Merge multi-property data.
  if (extraData.constructor === Object) {
    return utils.extend(extraData, utils.styleParser.parse(attrValue || {}));
  }

  // Return data, precendence to the defined value.
  return attrValue || extraData;
}
function mergeComponentData ( attrValue , extraData ) { // Extra data not defined, just return attrValue. if ( ! extraData ) { return attrValue ; } // Merge multi-property data. if ( extraData . constructor === Object ) { return utils . extend ( extraData , utils . styleParser . parse ( attrValue || { } ) ) ; } // Return data, precendence to the defined value. return attrValue || extraData ; }
Given entity defined value, merge in extra data if necessary.
Handle both single and multi-property components.

@param {string} attrValue - Entity data.
@param extraData - Entity data from another source to merge in.
Given entity defined value merge in extra data if necessary . Handle both single and multi - property components .