lib/mime.js
function( input, charset ) {

    if( /iso-?2022-?jp/i.test( charset ) ) {
      charset = 'shift_jis'
    }

    if( charset ) {
      return MIME.Iconv.decode( Buffer.from( input, 'base64' ), charset )
    } else {
      return Buffer.from( input, 'base64' ).toString()
    }

  }
function( input, charset ) {

    if( /iso-?2022-?jp/i.test( charset ) ) {
      charset = 'shift_jis'
    }

    if( charset ) {
      return MIME.Iconv.decode( Buffer.from( input, 'base64' ), charset )
    } else {
      return Buffer.from( input, 'base64' ).toString()
    }

  }
function ( input , charset ) { if ( / iso-?2022-?jp / i . test ( charset ) ) { charset = 'shift_jis' } if ( charset ) { return MIME . Iconv . decode ( Buffer . from ( input , 'base64' ) , charset ) } else { return Buffer . from ( input , 'base64' ) . toString ( ) } }
Decodes a base64 encoded string.

@param  {String} input
@param  {String} charset
@return {String|Buffer}
Decodes a base64 encoded string .