Skip to content

Instantly share code, notes, and snippets.

@OlivierLaflamme
Created March 23, 2020 13:46
Show Gist options
  • Save OlivierLaflamme/356c7cd2678b8d1fc22612c5bbb8382d to your computer and use it in GitHub Desktop.
Save OlivierLaflamme/356c7cd2678b8d1fc22612c5bbb8382d to your computer and use it in GitHub Desktop.
(function () {
var emps = [];
var s = new Set();
document.querySelectorAll('.actor-name').forEach( e=> {
s.add(e.innerText)
});
s.forEach(users => {
const fullname = users.split(",")[0].toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, "");
const names = fullname.split(" ");
const first = names[0];
const family = names[1];
emps.push(first[0] + family + "@email.com");
});
console.log(emps);
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment