You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • @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

    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.

About

Avatar for allObjects @allObjects started