Returns the value unchanged. Useful as a default transform or selector.
Any value.
identity(42) // => 42identity("hello") // => "hello"[1, 2, 3].map(identity) // => [1, 2, 3] Copy
identity(42) // => 42identity("hello") // => "hello"[1, 2, 3].map(identity) // => [1, 2, 3]
Returns the value unchanged. Useful as a default transform or selector.