Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Singleton = (function () {
- var instance;
- return function Construct () {
- if (instance) {
- return instance;
- }
- if (this && this.constructor === Construct) {
- instance = this;
- } else {
- return new Construct();
- }
- }
- }());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement