code: function isUrl(string){
      if (typeof string !== 'string') {
        return false;
      }
  
      var match = string.match(protocolAndDomainRE);
      if (!match) {
        return false;
      }
  
      var everythingAfterProtocol = match[1];
      if (!everythingAfterProtocol) {
        return false;
      }
  
      return localhostDomainRE.test(everythingAfterProtocol) ||
          nonLocalhostDomainRE.test(everythingAfterProtocol);
    }
docs: Loosely validate a URL `string`.
  
  Source: https://github.com/segmentio/is-url
  
  @param {String} string
  @return {Boolean}