From fb7973693eab2ebc05abf4d81a1fd5f15403a01f Mon Sep 17 00:00:00 2001 From: Jon Koops Date: Thu, 27 Jul 2023 13:32:21 +0200 Subject: [PATCH] Replace `atob` module with default global (#162) --- lib/atob.ts | 3 --- lib/base64_url_decode.ts | 2 -- 2 files changed, 5 deletions(-) delete mode 100644 lib/atob.ts diff --git a/lib/atob.ts b/lib/atob.ts deleted file mode 100644 index 1ce11da..0000000 --- a/lib/atob.ts +++ /dev/null @@ -1,3 +0,0 @@ -const global = (typeof globalThis !== "undefined" && globalThis) || window; - -export default global.atob.bind(global); diff --git a/lib/base64_url_decode.ts b/lib/base64_url_decode.ts index 3e27358..bdd83f8 100644 --- a/lib/base64_url_decode.ts +++ b/lib/base64_url_decode.ts @@ -1,5 +1,3 @@ -import atob from "./atob"; - function b64DecodeUnicode(str: string) { return decodeURIComponent( atob(str).replace(/(.)/g, function(m, p) {