code: function parseUrl$2(input) {
  	  var safe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  	  var url = input;
  
  	  if (safe) {
  	    var parser = document.createElement('a');
  	    parser.href = url;
  	    url = parser.href;
  	  }
  
  	  try {
  	    return new URL(url);
  	  } catch (e) {
  	    return null;
  	  }
  	}
docs: Parse a string to a URL object
  @param {String} input - the URL to be parsed
  @param {Boolean} safe - failsafe parsing