This does not seem to work for things like Bangle.#ontouch. While I can do Object.keys(Bangle.["#ontouch"]).length from the IDE terminal to detect if there is an array of functions in there, the code in the gist line 9 does not seem get the array. Generally the recursion path is not taken, as if everything is type function.
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.
While trying to find methods using a lot of time I thought of automatically wrapping all functions in an object to get some statistics. I came up with this: https://gist.github.com/halemmerich/a2e90fc2ea1aefd2bed8a20d3fb3bdf0
This does not seem to work for things like
Bangle.#ontouch
. While I can doObject.keys(Bangle.["#ontouch"]).length
from the IDE terminal to detect if there is an array of functions in there, the code in the gist line 9 does not seem get the array. Generally the recursion path is not taken, as if everything is type function.Ideas anyone?