encode = function (src, urlsafe) {
        if (urlsafe === void 0) { urlsafe = false; }
        return urlsafe
            ? _mkUriSafe(_encode(src))
            : _encode(src);
    }
converts a UTF-8-encoded string to a Base64 string.
@param {boolean} [urlsafe] if `true` make the result URL-safe
@returns {string} Base64 string