core/PreferenceManager.js
function set(key, value) {
        if (global.localStorage) {
            var _value;
            try {
                _value = JSON.stringify(value);
                global.localStorage.setItem(key, _value);
                $(exports).triggerHandler("change", [key, value]);
            } catch (e) {
                console.error("[PreferenceManager] Failed to write preference value of key: " + key);
            }
        }
    }
function set(key, value) {
        if (global.localStorage) {
            var _value;
            try {
                _value = JSON.stringify(value);
                global.localStorage.setItem(key, _value);
                $(exports).triggerHandler("change", [key, value]);
            } catch (e) {
                console.error("[PreferenceManager] Failed to write preference value of key: " + key);
            }
        }
    }
function set ( key , value ) { if ( global . localStorage ) { var _value ; try { _value = JSON . stringify ( value ) ; global . localStorage . setItem ( key , _value ) ; $ ( exports ) . triggerHandler ( "change" , [ key , value ] ) ; } catch ( e ) { console . error ( "[PreferenceManager] Failed to write preference value of key: " + key ) ; } } }
Change value of key
@param {string} key
@param {?} value
Change value of key