Accidentally accessing non-existent properties and tracking down where that is happening is a big time waster that a JavaScript proxy can help you track down.
In Fix Apps Script file order problems with Exports (https://ramblings.mcpher.com/gassnippets2/exports/) I described how to organize your Apps Script code better using an Exports object to describe and modify the classes and namespaces in your project, or in libraries your project uses. Now that you have this centralized view, it’s easy to add checks on attempts to access properties that don’t exist in your target object.
Accidentally accessing non-existent properties and tracking down where that is happening is a big time waster that a JavaScript proxy can help you track down.
In Fix Apps Script file order problems with Exports (https://ramblings.mcpher.com/gassnippets2/exports/) I described how to organize your Apps Script code better using an Exports object to describe and modify the classes and namespaces in your project, or in libraries your project uses. Now that you have this centralized view, it’s easy to add checks on attempts to access properties that don’t exist in your target object.
See how here https://ramblings.mcpher.com/gassnippets2/proxy-props/