I see where my error is. In nodejs I can load files directly from disc. In Espruino I load my files from the flash using the storage module. And this is read back as string, according to the docs. So my example was actually too short, but the hint regarding strings handling helped. Thanks.
My fix will be to pre-process the files before storing them to flash, escaping \n etc.
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.
I see where my error is. In nodejs I can load files directly from disc. In Espruino I load my files from the flash using the storage module. And this is read back as string, according to the docs. So my example was actually too short, but the hint regarding strings handling helped. Thanks.
My fix will be to pre-process the files before storing them to flash, escaping \n etc.