Yes, sure! You can do:
if (process.env.BOARD=="EMSCRIPTEN") { ... }
You could even set certain values in there, for example Bangle.isCharging = ()=>false;
Bangle.isCharging = ()=>false;
just simple Bangle.isCharging() ... and that course the emulator to fail.
That's odd - just tried it here and it seems to work fine?
@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, sure! You can do:
You could even set certain values in there, for example
Bangle.isCharging = ()=>false;
That's odd - just tried it here and it seems to work fine?