Hacker News new | ask | show | jobs
by braythwayt 4037 days ago
Writing this[rename](...) instead of this.rename(...) is hardly onerous.

Your solution mostly works, but a simpler one takes advantage of combining computed property keys and compact method syntax:

https://gist.github.com/raganwald/18f8c179101cfd93c291

1 comments

Okay, now this certainly feels better than my example and is much more bulletproof than prefixing function names with `_`, thanks.