This can be done because special characters for all names have already been replaced in the data file that is actually used (pages/data/kommuner.json).
This will first and foremost reduce confusion (I got confused why we had two kommuner.json in the project). And this will also give a slight performance improvement since we don't need to perform useless operations.
I did a global search for all the special characters that replaceLetters() is replacing and confirmed that these characters are no longer present in the project. And if we need this formatting for some reason in the future, we can search the git history, GitHub etc to get the replaceLetters() helper back.
Totally irrelevant now, but might be useful in the future:
Also, here's a script I created because I accidentally worked with the wrong dataset where strings were malformed:
This can be done because special characters for all names have already been replaced in the data file that is actually used (
pages/data/kommuner.json
).This will first and foremost reduce confusion (I got confused why we had two kommuner.json in the project). And this will also give a slight performance improvement since we don't need to perform useless operations.
I did a global search for all the special characters that
replaceLetters()
is replacing and confirmed that these characters are no longer present in the project. And if we need this formatting for some reason in the future, we can search the git history, GitHub etc to get thereplaceLetters()
helper back.Totally irrelevant now, but might be useful in the future:
Also, here's a script I created because I accidentally worked with the wrong dataset where strings were malformed: