const GMAILS_EMAILS = ``.toLowerCase(); // List of emails from GMail to: line. const GMAIL_EMAILS = GMAILS_EMAILS.split(',\n').map( email => email.substring( email.indexOf("<") + 1, email.lastIndexOf(">") )); const GROUPS_EMAILS = ``.toLowerCase(); // List of emails from Groups CSV download. const GROUP_EMAILS = GROUPS_EMAILS.split('\n').map( row => row.split(',')[0]); const GROUP_NOT_GMAIL = GROUP_EMAILS.filter( x => !GMAIL_EMAILS.includes(x)); console.log(`Missing ${GROUP_NOT_GMAIL} from GMail emails.`); const GMAIL_NOT_GROUP = GMAIL_EMAILS.filter( x => !GROUP_EMAILS.includes(x)); console.log(`Missing ${GMAIL_NOT_GROUP} from Group emails.`);