Skip to content

identity

Returns the value passed to it

46 bytes
since v12.7.0

Usage

This is useful when you need to pass a function somewhere that simply returns the value it receives, without any modification.

import * as _ from 'radashi'
_.identity() // => undefined
_.identity(1) // => 1
_.identity('a') // => 'a'