mirror of
https://github.com/voltbonn/diversity.volt.link.git
synced 2024-09-28 12:53:06 +00:00
remove the "Volt " in the team names
This commit is contained in:
parent
f5098ce05c
commit
f7b95afb74
6
index.js
6
index.js
|
@ -179,11 +179,15 @@ function reshapeTeamData(teams) {
|
|||
!team.name.includes('Expats')
|
||||
))
|
||||
.map(team => {
|
||||
const name = team.name
|
||||
let name = team.name
|
||||
.replace(/\([^()]*\)/g, '') // remove everything in brackets
|
||||
.replace(/\s+/g, ' ') // remove double spaces
|
||||
.trim()
|
||||
|
||||
if (name.toLowerCase().startsWith('volt ')) {
|
||||
name = name.slice(5)
|
||||
}
|
||||
|
||||
return {
|
||||
...team,
|
||||
name,
|
||||
|
|
Loading…
Reference in a new issue