Skip to content

Instantly share code, notes, and snippets.

@JamesMaroney
Forked from Contejious/gist:1978684
Created March 5, 2012 15:15
Show Gist options
  • Save JamesMaroney/1978696 to your computer and use it in GitHub Desktop.
Save JamesMaroney/1978696 to your computer and use it in GitHub Desktop.
GetConfig
function getConfigVal(key, defaultValue){
if(localStorage.getItem('fixtureMode') !== true) return defaultValue;
var localStorageValue = localStorage.getItem(key);
return localStorageValue === null ? defaultValue : localStorageValue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment