Function validatePascal

  • Converts to pascal case with type validation.

    Convert every property names of nested objects to follow the pascal case convention. If the input value does not follow the type T, it returns IValidation.Failure object. Otherwise, there's no problem on the input value, pascal cased converted data would be stored in the data property of the output IValidation.Success object.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: T

      Target object

    Returns IValidation<PascalCase<T>>

    Validation result with pascal case object

    Jeongho Nam - https://github.com/samchon

  • Converts to pascal case with type validation.

    Convert every property names of nested objects to follow the pascal case convention. If the input value does not follow the type T, it returns IValidation.Failure object. Otherwise, there's no problem on the input value, pascal cased converted data would be stored in the data property of the output IValidation.Success object.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: unknown

      Target object

    Returns IValidation<PascalCase<T>>

    Validation result with pascal case object

    Jeongho Nam - https://github.com/samchon