I like that, seems safer than my eval() approach. Probably a tiny bit slower because of the lookups done for the property names, but should be faster than switch. It seems close to what Gordon had mentioned from the layout library.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I like that, seems safer than my eval() approach. Probably a tiny bit slower because of the lookups done for the property names, but should be faster than switch. It seems close to what Gordon had mentioned from the layout library.