Function assertCamel

  • Converts to camel case with type assertion.

    Convert every property names of nested objects to follow the camel case convention. If the input value does not follow the type T, it throws TypeGuardError.

    Type Parameters

    • T

      Type of the input value

    Parameters

    Returns CamelCase<T>

    Camel case object

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

  • Converts to camel case with type assertion.

    Convert every property names of nested objects to follow the camel case convention. If the input value does not follow the type T, it throws TypeGuardError.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: unknown

      Target object

    • OptionalerrorFactory: ((props: TypeGuardError.IProps) => Error)

      Custom error factory. Default is TypeGuardError

    Returns CamelCase<T>

    Camel case object

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