sfmc-devtools
sfmc-devtools copied to clipboard
[TASK] replace underscore with hash names for private class features
hash names
_myPrivateField --> #myPrivateField _myPrivateMethod --> #myPrivateMethod
Advantage: javascript/node enforces its privacy. It simply disallows using that method outside of its scope
Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields
get and set
Also, introduce getters and setters to disallow directly accessing certain variables (e.g. Util.OPTIONS).
problems
- helper libraries are objects and not classes right now, including util.js. This would need to be changed potentially
Both changes together should ensure a more reliable and more readable overall solution with fewer or no shortcuts.