summaryrefslogtreecommitdiff
path: root/std/encoding
diff options
context:
space:
mode:
authorMarcos Casagrande <marcoscvp90@gmail.com>2020-07-07 20:43:11 +0200
committerGitHub <noreply@github.com>2020-07-07 20:43:11 +0200
commitcb98a594522e44fca885ca94ffdcc181ad902603 (patch)
treefa4195b2a08418610e35f04dbe1b2ed1f721cead /std/encoding
parente8571742eb512767fb047735ee5b1f510cd3b3e0 (diff)
fix(std): base64 in workers (#6681)
Diffstat (limited to 'std/encoding')
-rw-r--r--std/encoding/base64.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/encoding/base64.ts b/std/encoding/base64.ts
index 2f74c8df0..4c9aa4059 100644
--- a/std/encoding/base64.ts
+++ b/std/encoding/base64.ts
@@ -6,7 +6,7 @@
*/
export function encode(data: string | ArrayBuffer): string {
if (typeof data === "string") {
- return window.btoa(data);
+ return btoa(data);
} else {
const d = new Uint8Array(data);
let dataString = "";
@@ -14,7 +14,7 @@ export function encode(data: string | ArrayBuffer): string {
dataString += String.fromCharCode(d[i]);
}
- return window.btoa(dataString);
+ return btoa(dataString);
}
}
@@ -37,5 +37,5 @@ export function decode(data: string): ArrayBuffer {
* @param data input to decode
*/
export function decodeString(data: string): string {
- return window.atob(data);
+ return atob(data);
}