function setValue(sName, sValue) {
				if ( typeof sValue === "undefined" || sValue === null ) {
					return;
				}
				switch (M_SETTINGS[sName].type) {
				case "boolean":
					if ( typeof sValue === "string" ) {
						if (M_SETTINGS[sName].defaultValue) {
							config[sName] = sValue.toLowerCase() != "false";
						} else {
							config[sName] = sValue.toLowerCase() === "true" || sValue.toLowerCase() === "x";
						}
					} else {
						// boolean etc.
						config[sName] = !!sValue;
					}
					break;
				case "string":
					config[sName] = "" + sValue; // enforce string
					break;
				case "code":
					config[sName] = typeof sValue === "function" ? sValue : String(sValue);
					break;
				case "function":
					if ( typeof sValue !== "function" ) {
						throw new Error("unsupported value");
					}
					config[sName] = sValue;
					break;
				case "string[]":
					if ( Array.isArray(sValue) ) {
						config[sName] = sValue;
					} else if ( typeof sValue === "string" ) {
						config[sName] = sValue.split(/[ ,;]/).map(function(s) {
							return s.trim();
						});
					} else {
						throw new Error("unsupported value");
					}
					break;
				case "object":
					if ( typeof sValue !== "object" ) {
						throw new Error("unsupported value");
					}
					config[sName] = sValue;
					break;
				case "Locale":
					var oLocale = convertToLocaleOrNull(sValue);
					if ( oLocale || M_SETTINGS[sName].defaultValue == null ) {
						config[sName] = oLocale;
					} else {
						throw new Error("unsupported value");
					}
					break;
				default:
					// When the type is none of the above types, check if an object as enum is provided to validate the value.
					var vType = M_SETTINGS[sName].type;
					if (typeof vType === "object") {
						checkEnum(vType, sValue, sName);
						config[sName] = sValue;
					} else {
						throw new Error("illegal state");
					}
				}
			}
function setValue(sName, sValue) {
				if ( typeof sValue === "undefined" || sValue === null ) {
					return;
				}
				switch (M_SETTINGS[sName].type) {
				case "boolean":
					if ( typeof sValue === "string" ) {
						if (M_SETTINGS[sName].defaultValue) {
							config[sName] = sValue.toLowerCase() != "false";
						} else {
							config[sName] = sValue.toLowerCase() === "true" || sValue.toLowerCase() === "x";
						}
					} else {
						// boolean etc.
						config[sName] = !!sValue;
					}
					break;
				case "string":
					config[sName] = "" + sValue; // enforce string
					break;
				case "code":
					config[sName] = typeof sValue === "function" ? sValue : String(sValue);
					break;
				case "function":
					if ( typeof sValue !== "function" ) {
						throw new Error("unsupported value");
					}
					config[sName] = sValue;
					break;
				case "string[]":
					if ( Array.isArray(sValue) ) {
						config[sName] = sValue;
					} else if ( typeof sValue === "string" ) {
						config[sName] = sValue.split(/[ ,;]/).map(function(s) {
							return s.trim();
						});
					} else {
						throw new Error("unsupported value");
					}
					break;
				case "object":
					if ( typeof sValue !== "object" ) {
						throw new Error("unsupported value");
					}
					config[sName] = sValue;
					break;
				case "Locale":
					var oLocale = convertToLocaleOrNull(sValue);
					if ( oLocale || M_SETTINGS[sName].defaultValue == null ) {
						config[sName] = oLocale;
					} else {
						throw new Error("unsupported value");
					}
					break;
				default:
					// When the type is none of the above types, check if an object as enum is provided to validate the value.
					var vType = M_SETTINGS[sName].type;
					if (typeof vType === "object") {
						checkEnum(vType, sValue, sName);
						config[sName] = sValue;
					} else {
						throw new Error("illegal state");
					}
				}
			}
function setValue ( sName , sValue ) { if ( typeof sValue === "undefined" || sValue === null ) { return ; } switch ( M_SETTINGS [ sName ] . type ) { case "boolean" : if ( typeof sValue === "string" ) { if ( M_SETTINGS [ sName ] . defaultValue ) { config [ sName ] = sValue . toLowerCase ( ) != "false" ; } else { config [ sName ] = sValue . toLowerCase ( ) === "true" || sValue . toLowerCase ( ) === "x" ; } } else { // boolean etc. config [ sName ] = ! ! sValue ; } break ; case "string" : config [ sName ] = "" + sValue ; // enforce string break ; case "code" : config [ sName ] = typeof sValue === "function" ? sValue : String ( sValue ) ; break ; case "function" : if ( typeof sValue !== "function" ) { throw new Error ( "unsupported value" ) ; } config [ sName ] = sValue ; break ; case "string[]" : if ( Array . isArray ( sValue ) ) { config [ sName ] = sValue ; } else if ( typeof sValue === "string" ) { config [ sName ] = sValue . split ( / [ ,;] / ) . map ( function ( s ) { return s . trim ( ) ; } ) ; } else { throw new Error ( "unsupported value" ) ; } break ; case "object" : if ( typeof sValue !== "object" ) { throw new Error ( "unsupported value" ) ; } config [ sName ] = sValue ; break ; case "Locale" : var oLocale = convertToLocaleOrNull ( sValue ) ; if ( oLocale || M_SETTINGS [ sName ] . defaultValue == null ) { config [ sName ] = oLocale ; } else { throw new Error ( "unsupported value" ) ; } break ; default : // When the type is none of the above types, check if an object as enum is provided to validate the value. var vType = M_SETTINGS [ sName ] . type ; if ( typeof vType === "object" ) { checkEnum ( vType , sValue , sName ) ; config [ sName ] = sValue ; } else { throw new Error ( "illegal state" ) ; } } }
/*eslint-enable consistent-this
/ * eslint - enable consistent - this
Sets the value of a property