singleton
Version:
A singleton javascript class
21 lines (13 loc) • 339 B
JavaScript
// Generated by CoffeeScript 1.3.3
(function() {
var Singleton;
Singleton = (function() {
function Singleton() {}
Singleton.get = function() {
var _ref;
return (_ref = this.instance) != null ? _ref : this.instance = new this;
};
return Singleton;
})();
module.exports = Singleton;
}).call(this);