However if you simply type var StepperMotor = require("StepperMotor") into the right-hand side of the IDE, choose 'even after reset' for 'Save on Send' from the IDE options, upload, and then turn 'save on send' to off again, you can then write code and type save() and it'll save, and can even use reset() to reset state, but you'll always have access to the saved code you saved originally.
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.
It sounds like as @Wilberforce says just saving the code will do what you want... Here's a good start: http://www.espruino.com/Saving
However if you simply type
var StepperMotor = require("StepperMotor")
into the right-hand side of the IDE, choose 'even after reset' for 'Save on Send' from the IDE options, upload, and then turn 'save on send' to off again, you can then write code and typesave()
and it'll save, and can even usereset()
to reset state, but you'll always have access to the saved code you saved originally.