Yes, absolutely. Potentially a module is slightly worse as nothing in it can get freed in case the module is used again. If you did something like:
function onInit() { myBigFunction(); delete myBigFunction; }
you could explicitly remove the function. You could actually do delete require("myModule").bigFunction too, but it's pretty nasty :)
delete require("myModule").bigFunction
@Gordon started
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.
Yes, absolutely. Potentially a module is slightly worse as nothing in it can get freed in case the module is used again. If you did something like:
you could explicitly remove the function. You could actually do
delete require("myModule").bigFunction
too, but it's pretty nasty :)