validate(config) {
    if (! config || typeof config !== "object") throw new TypeError("Argument must be an object");
    let validatorObj = this[symbolValidatorObject];
    Object.getOwnPropertyNames(config).forEach(name => {
      if (this[name] === undefined) {
        throw new Error(`Property ${name} has not been declared in the init() method.`);
      }
      if (validatorObj && typeof validatorObj === "object" && validatorObj[name] ) {
        let validationFunc;
        if ( typeof validatorObj[name] === "function" ) {
          validationFunc = validatorObj[name];
        } else if ( typeof validatorObj[name] === "object" && typeof validatorObj[name].validate === "function" ) {
          validationFunc = validatorObj[name].validate;
        }
        let result = validationFunc(config[name]);
        switch (result) {
          case true:  return;
          case false: throw new Error(`Property ${name} does not validate '${validationFunc}'.`);
          default: throw new Error(result);
        }
      }
    });
  }
/**
   * Validates the config objec of the Base class constructor or the argument of the Base.set() method
   * @param {{}}
   */
Validates the config objec of the Base class constructor or the argument of the Base.set() method
@param {{}}
Validates the config objec of the Base class constructor or the argument of the Base . set () method @param {{ }}
validate(config) {
    if (! config || typeof config !== "object") throw new TypeError("Argument must be an object");
    let validatorObj = this[symbolValidatorObject];
    Object.getOwnPropertyNames(config).forEach(name => {
      if (this[name] === undefined) {
        throw new Error(`Property ${name} has not been declared in the init() method.`);
      }
      if (validatorObj && typeof validatorObj === "object" && validatorObj[name] ) {
        let validationFunc;
        if ( typeof validatorObj[name] === "function" ) {
          validationFunc = validatorObj[name];
        } else if ( typeof validatorObj[name] === "object" && typeof validatorObj[name].validate === "function" ) {
          validationFunc = validatorObj[name].validate;
        }
        let result = validationFunc(config[name]);
        switch (result) {
          case true:  return;
          case false: throw new Error(`Property ${name} does not validate '${validationFunc}'.`);
          default: throw new Error(result);
        }
      }
    });
  }
validate ( config ) { if ( ! config || typeof config !== "object" ) throw new TypeError ( "Argument must be an object" ) ; let validatorObj = this [ symbolValidatorObject ] ; Object . getOwnPropertyNames ( config ) . forEach ( name => { if ( this [ name ] === undefined ) { throw new Error ( ` ${ name } ` ) ; } if ( validatorObj && typeof validatorObj === "object" && validatorObj [ name ] ) { let validationFunc ; if ( typeof validatorObj [ name ] === "function" ) { validationFunc = validatorObj [ name ] ; } else if ( typeof validatorObj [ name ] === "object" && typeof validatorObj [ name ] . validate === "function" ) { validationFunc = validatorObj [ name ] . validate ; } let result = validationFunc ( config [ name ] ) ; switch ( result ) { case true : return ; case false : throw new Error ( ` ${ name } ${ validationFunc } ` ) ; default : throw new Error ( result ) ; } } } ) ; }
Validates the config objec of the Base class constructor or the argument of the Base.set() method
 @param {{}}
Validates the config objec of the Base class constructor or the argument of the Base . set () method @param {{ }}