identity

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
8
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
715 B
A function that does nothing but return the parameter supplied to it.
1 contributor
Install identity as a package?
Copied
npm i @bit/justin-capalbo.ramda.identity
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
identity (
x:*
) : *

A function that does nothing but return the parameter supplied to it. Good as a default or placeholder function.

Example
R.identity(1); //=> 1

     const obj = {};
     R.identity(obj) === obj; //=> true
Argument
x: *

The value to return.

Returns
*

The input value, `x`.

Help and resources