Skip to content

Instantly share code, notes, and snippets.

@keithwhor
Created June 20, 2018 07:22
Show Gist options
  • Save keithwhor/dfd5d72ca7462fd5115b1f2083d103fd to your computer and use it in GitHub Desktop.
Save keithwhor/dfd5d72ca7462fd5115b1f2083d103fd to your computer and use it in GitHub Desktop.
Code.xyz Function: User E-mail List Generation
/**
* Creates an e-mail list from provided user data
*/
module.exports = async (users = []) => {
return users.map(user => {
return `${user.first_name} <${user.email}>`;
}).join(', ');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment