main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
593 bytes
|
Line | |
---|
1 | import _curry1 from "./internal/_curry1.js";
|
---|
2 | import _identity from "./internal/_identity.js";
|
---|
3 | /**
|
---|
4 | * A function that does nothing but return the parameter supplied to it. Good
|
---|
5 | * as a default or placeholder function.
|
---|
6 | *
|
---|
7 | * @func
|
---|
8 | * @memberOf R
|
---|
9 | * @since v0.1.0
|
---|
10 | * @category Function
|
---|
11 | * @sig a -> a
|
---|
12 | * @param {*} x The value to return.
|
---|
13 | * @return {*} The input value, `x`.
|
---|
14 | * @example
|
---|
15 | *
|
---|
16 | * R.identity(1); //=> 1
|
---|
17 | *
|
---|
18 | * const obj = {};
|
---|
19 | * R.identity(obj) === obj; //=> true
|
---|
20 | * @symb R.identity(a) = a
|
---|
21 | */
|
---|
22 |
|
---|
23 | var identity =
|
---|
24 | /*#__PURE__*/
|
---|
25 | _curry1(_identity);
|
---|
26 |
|
---|
27 | export default identity; |
---|
Note:
See
TracBrowser
for help on using the repository browser.