diff --git a/common/base64.js b/common/base64.js index 88365c6b..bc73b7f3 100644 --- a/common/base64.js +++ b/common/base64.js @@ -1,7 +1,5 @@ 'use strict'; -const isFn = (a) => typeof a === 'function'; - module.exports.btoa = (str) => { if (typeof btoa === 'function') return btoa(str); @@ -12,7 +10,7 @@ module.exports.btoa = (str) => { }; module.exports.atob = (str) => { - if (isFn(atob)) + if (typeof atob === 'function') return atob(str); return Buffer