code: function inheritsFrom(validatedClass, expectedParentClass, errorText) {
    if (
      //fail-fast if it is nil
      !validatedClass ||
      //lenient check whether class directly or indirectly inherits from expected class
      (!(validatedClass.prototype instanceof expectedParentClass) &&
        validatedClass !== expectedParentClass)
    ) {
      throw new ValidationError(
        errorText || `Validated class does not inherit from ${expectedParentClass.name}`
      );
    }
    return validatedClass;
  }
docs: Checks value to inherit from a given class or to be that class
  @param validatedClass
  @param {class} expectedParentClass
  @param {string} [errorText] - message for error thrown if validation fails
  @returns {Object} validatedObject