How to use the urijs.parseHost function in urijs

To help you get started, we’ve selected a few urijs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github astefanutti / kubebox / lib / config / cluster.js View on Github external
static getUrlParts(url) {
    const uri = URI.parse(url);
    let parts = {};
    if (uri.protocol) {
      parts = uri;
    } else {
      URI.parseHost(url, parts);
    }
    return parts;
  }
}