Created
September 4, 2014 08:18
-
-
Save furaji/91bc3787ef6d9ab029e2 to your computer and use it in GitHub Desktop.
jsでシングルトンのクラス
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Hoge; | |
(function() { | |
var instance; | |
Hoge = function Hoge(argument1, argument2) { | |
if (instance) { | |
return instance; | |
} | |
instance = this; | |
// メソッド | |
this.set = function() { | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment