Having a bit of a bit of a go with this, it's working pretty well. The only traps have been losing the reset function and having trouble when accidentally calling some of the network code twice.
It'd be pretty easy to write a function to parse the output of getCached() and remove all modules not needed for network. Add something similar for variables and functions, and you'd have a selective reset(), letting you remove everything except your network connection. Turn it into a module, and you have a javascript-only one-line version of "setBootupCode". Thanks @Gordon!
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.
Having a bit of a bit of a go with this, it's working pretty well. The only traps have been losing the reset function and having trouble when accidentally calling some of the network code twice.
It'd be pretty easy to write a function to parse the output of getCached() and remove all modules not needed for network. Add something similar for variables and functions, and you'd have a selective reset(), letting you remove everything except your network connection. Turn it into a module, and you have a javascript-only one-line version of "setBootupCode". Thanks @Gordon!