Can anyone help me figure out how to get the name of the setter that is called when assigning a value? Here's an example:
var b = {};
var a = {
set hey(value) {
b[<name of setter>] = value;
}
}
I would like to retrieve the name of the setter as 'hey', so b.hey
will be equal to the value assigned to a.hey
.
I've been searching for a solution for a few days now with no luck. Any assistance would be greatly appreciated!