Created
September 28, 2018 15:10
-
-
Save mcavaliere/18ccf8baa51bc8b3bbb9aed4510e2837 to your computer and use it in GitHub Desktop.
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
export default class { | |
initConfig() { | |
this.config = // ... load a json file via AJAX, filesystem, etc. ... | |
return this.config; | |
}, | |
configSettingExists( key ) { | |
// Search the config object for the key value | |
let found = Object.keys( this.config ).indexOf( key ) | |
return found; | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment