Skip to content

Instantly share code, notes, and snippets.

@georgeOsdDev
Created January 26, 2013 12:27
Show Gist options
  • Save georgeOsdDev/4642043 to your computer and use it in GitHub Desktop.
Save georgeOsdDev/4642043 to your computer and use it in GitHub Desktop.
classっぽく書くときのメモ
(function(global){
"use strict";
var _App,version,name;
_App = (function(){
function _App(){
version = "0.0.1";
name = "SAMPLE";
}
_App.prototype.getVersion = function(){
return version;
};
_App.prototype.getName = function(){
return name;
};
return _App;
})();
var App = new _App();
if (typeof exports !== 'undefined') {
if (typeof module !== 'undefined' && module.exports) {
module.exports = App;
}
exports.App = App;
} else {
global.App = App;
}
})(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment