1
0
Fork 0
mirror of https://github.com/voltbonn/diversity.volt.link.git synced 2024-06-28 08:50:56 +00:00

remove the "Volt " in the team names

This commit is contained in:
thomasrosen 2022-11-20 23:29:59 +01:00
parent f5098ce05c
commit f7b95afb74

View file

@ -179,11 +179,15 @@ function reshapeTeamData(teams) {
!team.name.includes('Expats') !team.name.includes('Expats')
)) ))
.map(team => { .map(team => {
const name = team.name let name = team.name
.replace(/\([^()]*\)/g, '') // remove everything in brackets .replace(/\([^()]*\)/g, '') // remove everything in brackets
.replace(/\s+/g, ' ') // remove double spaces .replace(/\s+/g, ' ') // remove double spaces
.trim() .trim()
if (name.toLowerCase().startsWith('volt ')) {
name = name.slice(5)
}
return { return {
...team, ...team,
name, name,