chore(cloudcmd) lint

This commit is contained in:
coderaiser 2021-12-14 14:57:40 +02:00
parent a024dcdb61
commit 5accfeeaa7
3 changed files with 12 additions and 5 deletions

View file

@ -1,7 +1,9 @@
'use strict';
const isFn = (a) => typeof a === 'function';
module.exports.btoa = (str) => {
if (typeof btoa === 'function')
if (isFn(btoa))
return btoa(str);
return Buffer
@ -10,7 +12,7 @@ module.exports.btoa = (str) => {
};
module.exports.atob = (str) => {
if (typeof atob === 'function')
if (isFn(atob))
return atob(str);
return Buffer