Function isPrune

  • Prune, erase superfluous properties, with type checking.

    typia.misc.assertPrune() is a combination function of is and prune. Therefore, it removes every superfluous properties from the input object including nested objects, with type checking.

    In such reason, when input value is not matched with the type T, it returns false value. Otherwise, there's no problem on the input value, it returns true after removing every superfluous properties, including nested objects.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: T

      Target instance to check and prune

    Returns input is T

    Whether the parametric value is following the type T or not

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

  • Prune, erase superfluous properties, with type checking.

    typia.misc.assertPrune() is a combination function of is and prune. Therefore, it removes every superfluous properties from the input object including nested objects, with type checking.

    In such reason, when input value is not matched with the type T, it returns false value. Otherwise, there's no problem on the input value, it returns true after removing every superfluous properties, including nested objects.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: unknown

      Target instance to check and prune

    Returns input is T

    Whether the parametric value is following the type T or not

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