Last active
May 30, 2017 07:19
-
-
Save siddharthkrish/e830a918db9fd3ad401b0cfc28b9fb7a to your computer and use it in GitHub Desktop.
a possible way to define config variables for javascript
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 CONFIG = (function() { | |
var private = { | |
'LANG': 'en_sg', | |
'HOPOFF_WAIT': '5' | |
}; | |
return { | |
get: function(name) { return private[name]; } | |
}; | |
})(); | |
// usage | |
// CONFIG.get('LANG') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment