dist/vast-client-node.js
function resolveVastAdTagURI(vastAdTagUrl, originalUrl) {
  if (!originalUrl) {
    return vastAdTagUrl;
  }

  if (vastAdTagUrl.indexOf('//') === 0) {
    var _location = location,
        protocol = _location.protocol;

    return '' + protocol + vastAdTagUrl;
  }

  if (vastAdTagUrl.indexOf('://') === -1) {
    // Resolve relative URLs (mainly for unit testing)
    var baseURL = originalUrl.slice(0, originalUrl.lastIndexOf('/'));
    return baseURL + '/' + vastAdTagUrl;
  }

  return vastAdTagUrl;
}
function resolveVastAdTagURI(vastAdTagUrl, originalUrl) {
  if (!originalUrl) {
    return vastAdTagUrl;
  }

  if (vastAdTagUrl.indexOf('//') === 0) {
    var _location = location,
        protocol = _location.protocol;

    return '' + protocol + vastAdTagUrl;
  }

  if (vastAdTagUrl.indexOf('://') === -1) {
    // Resolve relative URLs (mainly for unit testing)
    var baseURL = originalUrl.slice(0, originalUrl.lastIndexOf('/'));
    return baseURL + '/' + vastAdTagUrl;
  }

  return vastAdTagUrl;
}
function resolveVastAdTagURI ( vastAdTagUrl , originalUrl ) { if ( ! originalUrl ) { return vastAdTagUrl ; } if ( vastAdTagUrl . indexOf ( '//' ) === 0 ) { var _location = location , protocol = _location . protocol ; return '' + protocol + vastAdTagUrl ; } if ( vastAdTagUrl . indexOf ( '://' ) === - 1 ) { // Resolve relative URLs (mainly for unit testing) var baseURL = originalUrl . slice ( 0 , originalUrl . lastIndexOf ( '/' ) ) ; return baseURL + '/' + vastAdTagUrl ; } return vastAdTagUrl ; }
Converts relative vastAdTagUri.
@param  {String} vastAdTagUrl - The url to resolve.
@param  {String} originalUrl - The original url.
@return {String}
Converts relative vastAdTagUri .