mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-27 01:36:28 +00:00
chore(cloudcmd) lint
This commit is contained in:
parent
a024dcdb61
commit
5accfeeaa7
3 changed files with 12 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue