src/videoCache.js
function toStorageRequest(bid) {
  const vastValue = bid.vastXml ? bid.vastXml : wrapURI(bid.vastUrl, bid.vastImpUrl);
  let payload = {
    type: 'xml',
    value: vastValue,
    ttlseconds: Number(bid.ttl)
  };

  if (typeof bid.customCacheKey === 'string' && bid.customCacheKey !== '') {
    payload.key = bid.customCacheKey;
  }

  return payload;
}
function toStorageRequest(bid) {
  const vastValue = bid.vastXml ? bid.vastXml : wrapURI(bid.vastUrl, bid.vastImpUrl);
  let payload = {
    type: 'xml',
    value: vastValue,
    ttlseconds: Number(bid.ttl)
  };

  if (typeof bid.customCacheKey === 'string' && bid.customCacheKey !== '') {
    payload.key = bid.customCacheKey;
  }

  return payload;
}
function toStorageRequest ( bid ) { const vastValue = bid . vastXml ? bid . vastXml : wrapURI ( bid . vastUrl , bid . vastImpUrl ) ; let payload = { type : 'xml' , value : vastValue , ttlseconds : Number ( bid . ttl ) } ; if ( typeof bid . customCacheKey === 'string' && bid . customCacheKey !== '' ) { payload . key = bid . customCacheKey ; } return payload ; }
Wraps a bid in the format expected by the prebid-server endpoints, or returns null if
the bid can't be converted cleanly.

@param {CacheableBid} bid
Wraps a bid in the format expected by the prebid - server endpoints or returns null if the bid can t be converted cleanly .