Great - thanks for posting it up!
However it looks like you need require("Storage").open(logFileName,"r").erase() instead of require("Storage").erase(logFileName);
require("Storage").open(logFileName,"r").erase()
require("Storage").erase(logFileName);
It's a bit tricky at the moment but StorageFile and the files created by require("Storage").read/write/erase are a bit different.
@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.
Great - thanks for posting it up!
However it looks like you need
require("Storage").open(logFileName,"r").erase()
instead ofrequire("Storage").erase(logFileName);
It's a bit tricky at the moment but StorageFile and the files created by require("Storage").read/write/erase are a bit different.