Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcavaliere/18ccf8baa51bc8b3bbb9aed4510e2837 to your computer and use it in GitHub Desktop.
Save mcavaliere/18ccf8baa51bc8b3bbb9aed4510e2837 to your computer and use it in GitHub Desktop.
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