function.name - functionality #5023
Replies: 1 comment
-
Posted at 2021-11-25 by @gfwilliams Hmm, that's a tricky one - yes
If all the functions you care about are in the global scope, you could run some code like this that adds
Posted at 2021-11-25 by @SimonGAndrews Thanks @gfwilliams,. I get the issue now with implementing. Really enjoying working with Espruino , Pico is great, 5v tolerance really useful. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-11-20 by @SimonGAndrews
Hello,
Im looking to use Function.name in javascript. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name
while porting the Xstate library to Expruino.
I believe Function.name or similiar is not available in Espruino.
Also a common polyfill uses function.toString() and Although Espruino does have Object.toString() which operates on a function , the returned string does not provide the name. (see attached).
Any thoughts on the possibility of implementing function.name or a workaround to get the name of a function ?
Thanks in Advance
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions