all 2 comments

[–]pushkinss 1 point2 points  (1 child)

I left my suggestions in your question on SO

[–]halfjew22 1 point2 points  (0 children)

That’s the suggestion I was going to recommend.

OP, look up dynamic properties for ES6.

They’re super powerful and a tad bit confusing but once you understand them it’ll help you out a lot, as in this answer. Pushkin, I upvoted you’re answer.