src/auction.js
function groupByPlacement(bidsByPlacement, bid) {
  if (!bidsByPlacement[bid.adUnitCode]) { bidsByPlacement[bid.adUnitCode] = { bids: [] }; }
  bidsByPlacement[bid.adUnitCode].bids.push(bid);
  return bidsByPlacement;
}
function groupByPlacement(bidsByPlacement, bid) {
  if (!bidsByPlacement[bid.adUnitCode]) { bidsByPlacement[bid.adUnitCode] = { bids: [] }; }
  bidsByPlacement[bid.adUnitCode].bids.push(bid);
  return bidsByPlacement;
}
function groupByPlacement ( bidsByPlacement , bid ) { if ( ! bidsByPlacement [ bid . adUnitCode ] ) { bidsByPlacement [ bid . adUnitCode ] = { bids : [ ] } ; } bidsByPlacement [ bid . adUnitCode ] . bids . push ( bid ) ; return bidsByPlacement ; }
groupByPlacement is a reduce function that converts an array of Bid objects
to an object with placement codes as keys, with each key representing an object
with an array of `Bid` objects for that placement
@returns {*} as { [adUnitCode]: { bids: [Bid, Bid, Bid] } }
groupByPlacement is a reduce function that converts an array of Bid objects to an object with placement codes as keys with each key representing an object with an array of Bid objects for that placement