take a look at the specs and all the samples: none use any extension... - no .js or .min.js when loading from local sandbox modules folder. Check the setup of you IDE for the proper discover / lookup / search sequence.
Just use
const ScadaJs = require("scada");
and pick a naming like const = scadaModule ... if it behaves like a module of const Scada = ... if it is a constructor / behaves like a class definition. This helps in your app's type safety / robustness. You can also come up with a notation of your own for type oriented suffixes, like ...M or ...Mod for modules. You may find similar as 'best practice' of implementation of ancient interpretative languages / language dialects - like some BASICs - that denoted a String variable by (required) appending of the dollar sign ($), such as let name$ =, or let count% = for integers. Even though these times are long gone, the concept is still useful... and can be reflected by providing adequate naming and using upper / lower casing.
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.
@wolandec
take a look at the specs and all the samples: none use any extension... - no .js or .min.js when loading from local sandbox modules folder. Check the setup of you IDE for the proper discover / lookup / search sequence.
Just use
and pick a naming like
const = scadaModule ...
if it behaves like a module ofconst Scada = ...
if it is a constructor / behaves like a class definition. This helps in your app's type safety / robustness. You can also come up with a notation of your own for type oriented suffixes, like...M
or...Mod
for modules. You may find similar as 'best practice' of implementation of ancient interpretative languages / language dialects - like some BASICs - that denoted a String variable by (required) appending of the dollar sign($)
, such aslet name$ =
, orlet count% =
for integers. Even though these times are long gone, the concept is still useful... and can be reflected by providing adequate naming and using upper / lower casing.