dist/utils.js
function encodeAddressName(name) {
  if (!/^[\w ']*$/.test(name)) {
    if (/^[\x20-\x7e]*$/.test(name)) {
      return '"' + name.replace(/([\\"])/g, '\\$1') + '"';
    } else {
      return (0, _emailjsMimeCodec.mimeWordEncode)(name, 'Q');
    }
  }
  return name;
}
function encodeAddressName(name) {
  if (!/^[\w ']*$/.test(name)) {
    if (/^[\x20-\x7e]*$/.test(name)) {
      return '"' + name.replace(/([\\"])/g, '\\$1') + '"';
    } else {
      return (0, _emailjsMimeCodec.mimeWordEncode)(name, 'Q');
    }
  }
  return name;
}
function encodeAddressName ( name ) { if ( ! / ^[\w ']*$ / . test ( name ) ) { if ( / ^[\x20-\x7e]*$ / . test ( name ) ) { return '"' + name . replace ( / ([\\"]) / g , '\\$1' ) + '"' ; } else { return ( 0 , _emailjsMimeCodec . mimeWordEncode ) ( name , 'Q' ) ; } } return name ; }
If needed, mime encodes the name part

@param {String} name Name part of an address
@returns {String} Mime word encoded string if needed
 /* eslint-disable node/no-deprecated-api /* eslint-disable no-control-regex
If needed mime encodes the name part