modules/adkernelBidAdapter.js
function dispatchImps(bidRequests, refererInfo) {
  let secure = (refererInfo && refererInfo.referer.indexOf('https:') === 0);
  return bidRequests.map(bidRequest => buildImp(bidRequest, secure))
    .reduce((acc, curr, index) => {
      let bidRequest = bidRequests[index];
      let zoneId = bidRequest.params.zoneId;
      let host = bidRequest.params.host;
      acc[host] = acc[host] || {};
      acc[host][zoneId] = acc[host][zoneId] || [];
      acc[host][zoneId].push(curr);
      return acc;
    }, {});
}
function dispatchImps(bidRequests, refererInfo) {
  let secure = (refererInfo && refererInfo.referer.indexOf('https:') === 0);
  return bidRequests.map(bidRequest => buildImp(bidRequest, secure))
    .reduce((acc, curr, index) => {
      let bidRequest = bidRequests[index];
      let zoneId = bidRequest.params.zoneId;
      let host = bidRequest.params.host;
      acc[host] = acc[host] || {};
      acc[host][zoneId] = acc[host][zoneId] || [];
      acc[host][zoneId].push(curr);
      return acc;
    }, {});
}
function dispatchImps ( bidRequests , refererInfo ) { let secure = ( refererInfo && refererInfo . referer . indexOf ( 'https:' ) === 0 ) ; return bidRequests . map ( bidRequest => buildImp ( bidRequest , secure ) ) . reduce ( ( acc , curr , index ) => { let bidRequest = bidRequests [ index ] ; let zoneId = bidRequest . params . zoneId ; let host = bidRequest . params . host ; acc [ host ] = acc [ host ] || { } ; acc [ host ] [ zoneId ] = acc [ host ] [ zoneId ] || [ ] ; acc [ host ] [ zoneId ] . push ( curr ) ; return acc ; } , { } ) ; }
Dispatch impressions by ad network host and zone
Dispatch impressions by ad network host and zone