export const base64 = { } ; if ( typeof btoa === 'undefined' ) { base64 . btoa = function btoa ( b ) : string { return Buffer . from ( b , 'binary' ) . toString ( 'base64' ) ; } ; } else { base64 . btoa = ( x ) => btoa ( x ) ; } if ( typeof atob === 'undefined' ) { base64 . atob = function atob ( b ) : string { return Buffer . from ( b , 'base64' ) . toString ( 'binary' ) ; } ; } else { base64 . atob = ( x ) => atob ( x ) ; }