safe(url) {
		let { url: uri, query } = this.parse(url);
		url = uri;
		const protocol = (this.PROTOCOL_PATTERN.exec(url) || [])[0] || "";
		if (protocol) url = url.replace(new RegExp("^" + protocol), "");
		const parts = url.split("/").map((part, i) => {
			if (i === 0) return part;
			return fixedEncodeURIComponent(part);
		});
		return protocol + parts.join("/") + query;

		function fixedEncodeURIComponent(str) {
			return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
				return "%" + c.charCodeAt(0).toString(16);
			});
		}
	}
Make url safe by encoding url components
@param {string} url
@returns {string}