modules/ixBidAdapter.js
function parseBid(rawBid, currency) {
  const bid = {};

  if (PRICE_TO_DOLLAR_FACTOR.hasOwnProperty(currency)) {
    bid.cpm = rawBid.price / PRICE_TO_DOLLAR_FACTOR[currency];
  } else {
    bid.cpm = rawBid.price / CENT_TO_DOLLAR_FACTOR;
  }

  bid.requestId = rawBid.impid;
  bid.width = rawBid.w;
  bid.height = rawBid.h;
  bid.ad = rawBid.adm;
  bid.dealId = utils.deepAccess(rawBid, 'ext.dealid');
  bid.ttl = TIME_TO_LIVE;
  bid.netRevenue = NET_REVENUE;
  bid.currency = currency;
  bid.creativeId = rawBid.hasOwnProperty('crid') ? rawBid.crid : '-';

  bid.meta = {};
  bid.meta.networkId = utils.deepAccess(rawBid, 'ext.dspid');
  bid.meta.brandId = utils.deepAccess(rawBid, 'ext.advbrandid');
  bid.meta.brandName = utils.deepAccess(rawBid, 'ext.advbrand');

  return bid;
}
function parseBid(rawBid, currency) {
  const bid = {};

  if (PRICE_TO_DOLLAR_FACTOR.hasOwnProperty(currency)) {
    bid.cpm = rawBid.price / PRICE_TO_DOLLAR_FACTOR[currency];
  } else {
    bid.cpm = rawBid.price / CENT_TO_DOLLAR_FACTOR;
  }

  bid.requestId = rawBid.impid;
  bid.width = rawBid.w;
  bid.height = rawBid.h;
  bid.ad = rawBid.adm;
  bid.dealId = utils.deepAccess(rawBid, 'ext.dealid');
  bid.ttl = TIME_TO_LIVE;
  bid.netRevenue = NET_REVENUE;
  bid.currency = currency;
  bid.creativeId = rawBid.hasOwnProperty('crid') ? rawBid.crid : '-';

  bid.meta = {};
  bid.meta.networkId = utils.deepAccess(rawBid, 'ext.dspid');
  bid.meta.brandId = utils.deepAccess(rawBid, 'ext.advbrandid');
  bid.meta.brandName = utils.deepAccess(rawBid, 'ext.advbrand');

  return bid;
}
function parseBid ( rawBid , currency ) { const bid = { } ; if ( PRICE_TO_DOLLAR_FACTOR . hasOwnProperty ( currency ) ) { bid . cpm = rawBid . price / PRICE_TO_DOLLAR_FACTOR [ currency ] ; } else { bid . cpm = rawBid . price / CENT_TO_DOLLAR_FACTOR ; } bid . requestId = rawBid . impid ; bid . width = rawBid . w ; bid . height = rawBid . h ; bid . ad = rawBid . adm ; bid . dealId = utils . deepAccess ( rawBid , 'ext.dealid' ) ; bid . ttl = TIME_TO_LIVE ; bid . netRevenue = NET_REVENUE ; bid . currency = currency ; bid . creativeId = rawBid . hasOwnProperty ( 'crid' ) ? rawBid . crid : '-' ; bid . meta = { } ; bid . meta . networkId = utils . deepAccess ( rawBid , 'ext.dspid' ) ; bid . meta . brandId = utils . deepAccess ( rawBid , 'ext.advbrandid' ) ; bid . meta . brandName = utils . deepAccess ( rawBid , 'ext.advbrand' ) ; return bid ; }
Parses a raw bid for the relevant information.

@param  {object} rawBid   The bid to be parsed.
@param  {string} currency Global currency in bid response.
@return {object} bid      The parsed bid.
Parses a raw bid for the relevant information .