Singleton design pattern implementation which easy to use.
Just apply this to any constructor function and all 'new' operators for this constructor will return the same instance.
Usage
To install just use NPM
npm install pragma-singleton
var singleton = ; { thissomeValue = someValue;} var SingletonConstructor = instance1 = 'value1' instance2 = 'value2'; console; // true, because the same instanceconsole; // value1, because the value of first created instance
Pragma Dudes wish you live long and prosper.