rhodonite
    Preparing search index...

    Function ifExistsThenWithReturn

    • Executes a callback if the value exists and returns the result

      Type Parameters

      • T

        The type of the value

      Parameters

      • callback: (value: T) => T

        The callback function to execute that returns a value

      • Optionalvalue: T

        The value to check (optional)

      Returns T | undefined

      The result of the callback if value exists, otherwise undefined