libraries/tracking-core/helpers/formatHelpers.js
function formatFavouriteListItems(products) {
  if (!products || !Array.isArray(products)) {
    return [];
  }

  return products.map(product => ({
    id: get(product, 'product_number_public') || get(product, 'product_number') || get(product, 'uid'),
    type: 'product',
    name: get(product, 'name'),
    priceNet: getUnifiedNumber(get(product, 'unit_amount_net')) / 100,
    priceGross: getUnifiedNumber(get(product, 'unit_amount_with_tax')) / 100,
    currency: get(product, 'currency_id'),
  }));
}
function formatFavouriteListItems(products) {
  if (!products || !Array.isArray(products)) {
    return [];
  }

  return products.map(product => ({
    id: get(product, 'product_number_public') || get(product, 'product_number') || get(product, 'uid'),
    type: 'product',
    name: get(product, 'name'),
    priceNet: getUnifiedNumber(get(product, 'unit_amount_net')) / 100,
    priceGross: getUnifiedNumber(get(product, 'unit_amount_with_tax')) / 100,
    currency: get(product, 'currency_id'),
  }));
}
function formatFavouriteListItems ( products ) { if ( ! products || ! Array . isArray ( products ) ) { return [ ] ; } return products . map ( product => ( { id : get ( product , 'product_number_public' ) || get ( product , 'product_number' ) || get ( product , 'uid' ) , type : 'product' , name : get ( product , 'name' ) , priceNet : getUnifiedNumber ( get ( product , 'unit_amount_net' ) ) / 100 , priceGross : getUnifiedNumber ( get ( product , 'unit_amount_with_tax' ) ) / 100 , currency : get ( product , 'currency_id' ) , } ) ) ; }
Convert products from the favouriteListItemAdded event to unified items

@param {Array} products Items from sgData
@returns {UnifiedAddToWishlistItem[]} Data for the unified items
Convert products from the favouriteListItemAdded event to unified items