code: function visibilityFnParams(param1, param2, param3, param4) {
          //name must always be set
          if (param1 == undefined)
              throw new Error('feature.visibility(): 1st parameter name must be defined');
  
          if (arguments.length == 1)
              throw new Error('feature.visibility(): 2nd parameter name must be a boolean or function, but is empty');
  
          let name = param1, variant = null, data = null, result = null;
          if (param3 == undefined && param4 == undefined) {
              result = param2;
          }
          else if (param4 == undefined) {
              variant = param2;
              result = param3;
          }
          else {
              variant = param2;
              data = param3;
              result = param4;
          }
  
          return {
              name,
              variant,
              data,
              result
          }
      }
docs: /*
  the following calls are possible:
  visibility(name,result);
  visibility(name,variant,result);
  visibility(name,variant,data,result);
  
  =>
  param1: name
  param2: result || variant
  param3: result || data
  param4: result