From e3c6f06239accc95e8b54b0d33093f6be29bef25 Mon Sep 17 00:00:00 2001 From: "Christopher Jeffrey (JJ)" Date: Fri, 1 Mar 2024 07:14:42 -0500 Subject: [PATCH] Remove `global` accesses. See #347 (#354) --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 32f290f..bdea604 100644 --- a/index.js +++ b/index.js @@ -38,10 +38,10 @@ exports.constants = { MAX_STRING_LENGTH: K_STRING_MAX_LENGTH } -exports.Blob = global.Blob -exports.File = global.File -exports.atob = global.atob -exports.btoa = global.btoa +exports.Blob = typeof Blob !== 'undefined' ? Blob : undefined +exports.File = typeof File !== 'undefined' ? File : undefined +exports.atob = typeof atob !== 'undefined' ? atob : undefined +exports.btoa = typeof btoa !== 'undefined' ? btoa : undefined /** * If `Buffer.TYPED_ARRAY_SUPPORT`: -- 2.34.1