function prependSchemeToUrl(url, scheme = 'http') {
    if (regexUrlStartsWithProtocol.test(url)) {
        return url.replace(regexUrlStartsWithProtocol, `${scheme}://`);
    }

    return `${scheme}://${url}`;
}
Prepends the scheme to the URL.

@param  {string} url      - The URL to mutate.
@param  {string} [scheme] - The URL scheme to prepend.
@return {string} Returns the mutated URL.