@tremendous/help
    Preparing search index...

    Function identity

    • Returns the provided value unchanged.

      This function is useful as a default iteratee or transformer function that simply returns the input value.

      Type Parameters

      • T

        The type of the value.

      Parameters

      • value: T

        The value to return.

      Returns T

      • The same value that was provided as input.
      const value = 42;
      const result = identity(value);
      // result will be 42