@lavadrop/identity
Part of a library of zero-dependency npm modules that do just one thing.
- 100% TypeScript support.
- It's not a party without
Lavadrop
!
min + gzip | 62 bytes
Returns the first argument it receives and ignores any additional arguments.
Usage
import identity from '@lavadrop/identity'
const object = { a: 1 }
identity(object) === object
// => true
Parameters
Name | Type | Description |
---|---|---|
value |
T |
Any value. |
_args |
any[] |
Type parameters
Name |
---|
T |
Returns
The first argument it receives.
Return type
T