Encapsulation is handled better or worse in other languages... better means: more obvious and and enforced, where as JavaScript gives a lot of freedom and therefore expects more from the discipline of the coder...
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.
@luwar, https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler may be the solution here...
Encapsulation is handled better or worse in other languages... better means: more obvious and and enforced, where as JavaScript gives a lot of freedom and therefore expects more from the discipline of the coder...