Using the Revealing Module Pattern
The first well-architected JavaScript application I worked on used what is
commonly called the Revealing Module Pattern. I’ve used this pattern on
projects ranging from 100 to 100,000 lines of code. I think I’ve found its
breaking points, but also its sweet spots.