code: function (url) {
          if (typeof url !== 'string') {
              throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof url}\``);
          }
          url = url.trim();
          if (/^\.*\/|^(?!localhost)\w+:/.test(url)) {
              return url;
          }
          return url.replace(/^(?!(?:\w+:)?\/\/)/, 'https://');
      }
docs: Ensure that the specified url contains a https:// protocol