_/Chapter_9/ImagesInc/js/Modules/Core/StorageHandler.js
// if the key has no value, just add the string as the value of the key in storage
if the key has no value, just add the string as the value of the key in storage
if the key has no value just add the string as the value of the key in storage
function appendStringToLocalStorage(key, value, encode) {
        var storedValue = getValueForKeyAsString(key, encode),
            valueToStore;
        if (storedValue) {
            valueToStore = storedValue + value;
        } else {
            valueToStore = value;
        }
        if (encode) {
            valueToStore = encodeURI(valueToStore);
        }
        localStorage.setItem(key, valueToStore);
    }
function appendStringToLocalStorage ( key , value , encode ) { var storedValue = getValueForKeyAsString ( key , encode ) , valueToStore ; if ( storedValue ) { valueToStore = storedValue + value ; } else { valueToStore = value ; } if ( encode ) { valueToStore = encodeURI ( valueToStore ) ; } localStorage . setItem ( key , valueToStore ) ; }
if the key has no value, just add the string as the value of the key in storage
if the key has no value just add the string as the value of the key in storage