Last active
September 28, 2018 15:38
-
-
Save mcavaliere/9d097d5148ee6fa45e60917870fbdc53 to your computer and use it in GitHub Desktop.
This file contains 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 { | |
configSettingExists( config, key ) { | |
// Search the config object for the key value | |
let found = Object.keys( config ).indexOf( key ) | |
return found; | |
}, | |
indexArrayBy(arr, attrName, group=false) { | |
// ... | |
}, | |
initConfig() { | |
// ... load a json file via AJAX, filesystem, etc. ... | |
return config | |
}, | |
printConfigFormatInstructions() { | |
console.log('Your config file must be in json format, and contain the following keys: foo, bar, baz.'); | |
}, | |
toRGBA(hex, opacity) { | |
// ... | |
}, | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment