function(data) {
        // We iterate over data rather than keys so we don't forget values
        // which don't have a setting yet.
        for (var key in data) {
            if (data.hasOwnProperty(key)) {
                var setting = this._settings[key];
                if (setting) {
                    var value = setting.type.parse(data[key]);
                    this.set(key, value);
                } else {
                    this.set(key, data[key]);
                }
            }
        }
    }
function(data) {
        
        
        for (var key in data) {
            if (data.hasOwnProperty(key)) {
                var setting = this._settings[key];
                if (setting) {
                    var value = setting.type.parse(data[key]);
                    this.set(key, value);
                } else {
                    this.set(key, data[key]);
                }
            }
        }
    }
function ( data ) { // We iterate over data rather than keys so we don't forget values // which don't have a setting yet. for ( var key in data ) { if ( data . hasOwnProperty ( key ) ) { var setting = this . _settings [ key ] ; if ( setting ) { var value = setting . type . parse ( data [ key ] ) ; this . set ( key , value ) ; } else { this . set ( key , data [ key ] ) ; } } } }
Utility to load settings from an object
Utility to load settings from an object