Skip to content

Commit b9006fe

Browse files
authored
Merge pull request #69 from Matdata-eu/copilot/sub-pr-67-again
Replace deprecated btoa encoding with base64EncodeUnicode in Tab.ts
2 parents 1b34a52 + 210e9e6 commit b9006fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/yasqe/src/sparql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function createBasicAuthHeader(username: string, password: string): string {
3030
* Base64-encode a Unicode string using UTF-8 encoding.
3131
* This avoids errors with btoa() and supports all Unicode characters.
3232
*/
33-
function base64EncodeUnicode(str: string): string {
33+
export function base64EncodeUnicode(str: string): string {
3434
if (typeof window !== "undefined" && typeof window.TextEncoder !== "undefined") {
3535
const utf8Bytes = new window.TextEncoder().encode(str);
3636
let binary = "";

0 commit comments

Comments
 (0)