Open SimonGAndrews opened 3 years ago
Investigation of an alternative pattern in Espruino is ongoing, raised a question on Espruino forum.
Alternative methods/Polyfills investigated to date rely on parsing the result of function.toString. Unfortunatley Espruino does not put the function name into the function.toString() output.
Continuing to test impact.
Function.name is indeed not supported (yet?) - https://github.com/espruino/Espruino/issues/1348
Espruino does not seem to support function.name to return the name property of a function.
This gives an issue in the function toActionObject() , in that the type of a function action is always 'undefined'. May not be a show stopper as xstate/fsm behaves similiarly when multiple actions are defined within an array in the machine definition. Further testing required.