generated from skills/copilot-codespaces-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmember.js
30 lines (24 loc) · 799 Bytes
/
member.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function skillsMembers(){
// Get the data from the member page
var members = document.querySelector('.member-list').querySelectorAll('.member');
var skills = [];
var membersArray = [];
members.forEach(member => {
var memberData = {
'name': member.querySelector('.member-name').innerText,
'skills': []
};
var skillsList = member.querySelector('.member-skills').querySelectorAll('li');
skillsList.forEach(skill => {
memberData.skills.push(skill.innerText);
if (!skills.includes(skill.innerText)){
skills.push(skill.innerText);
}
});
membersArray.push(memberData);
});
return {
'skills': skills,
'members': membersArray
};
}