docs: function resolveURL(url, path) {
    if (typeof url !== 'string' || typeof path !== 'string') {
      return new Error('url-and-path-required');
    }
  
    /* Remove leading and duplicate slashes */
    url = url.replace(/\/{2,}/g, '/').replace(/^\//, '').replace(':/','://');
  
    let parsedUrl = urlModule.parse(url);
    if (protocols.indexOf(parsedUrl.protocol) < 0 || !parsedUrl.host) {
      return new Error('invalid-url');
    }
  
    let resolvedUrl = urlModule.resolve(parsedUrl.href, path);
    return resolvedUrl;
  }