Created
November 7, 2012 01:30
-
-
Save jason-s13r/4028984 to your computer and use it in GitHub Desktop.
@js gist: loading test.
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
self.Constants = function () { | |
var _constants = {}; | |
return { | |
get: function (name) { | |
return _constants[name]; | |
}, | |
add: function (name, value) { | |
if(typeof _constants[name] != "undefined") { | |
return value; | |
} | |
_constants[name] = value; | |
return _constants[name] == value; | |
}, | |
del: function (name) { | |
return delete _constants[name]; | |
}, | |
all: function () { | |
return _constants; | |
} | |
}; | |
}; | |
self.constant = Constants(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment