-
A JavaScript Singleton, Part 1
I assume that the reader is familiar with objects, closures and prototypal inheritance in JavaScript ... A Singleton can be created from these components.
- A JavaScript Singleton, Part 2
[Since the "Encapsulation Pattern"] is a constructor it behaves as any other, and an instance of it behaves as any other, so anything that can be done with a constructor or an instance can be done with the "Encapsulation Pattern".