I am trying to learn some javascript best practices when writing repetitive functions that can be declared dynamically... I managed to do it in my getters and mutations but