My question is simple, how could i make aliases on object getters.
Example:
MyClass.prototype = {
constructor: MyClass,
get a() {
// do stuff
},
get ab() {
// do stuff
},
get abc() {
// do stuff
}
}
Here, a
, ab
and abc
does exactly the same, but it is mandatory to have these 3 different getters, or more precisely, it is mandatory to have 3 different names over the same functionality.
get a = ab = abc {
}
is obviously not working, neither does
get a() = ab() = abc() {
}
Any suggestions?
Thanks