mirror of
https://github.com/voltbonn/diversity.volt.link.git
synced 2024-09-29 13:26:13 +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')
|
!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,
|
||||||
|
|
Loading…
Reference in a new issue