()
| 18 | * @category Function |
| 19 | */ |
| 20 | export function identity(): IdentityFunction { |
| 21 | // Notice that the exported identity function is just the "factory" for the |
| 22 | // identity function. We do it this way so that all "Function" utilities have |
| 23 | // a similar API where the function is called, and not just used "headless". |
| 24 | // e.g. `identity()` and not `identity`, just like the API for `constant(1)`. |
| 25 | return identityImplementation; |
| 26 | } |
| 27 | |
| 28 | const identityImplementation: IdentityFunction = (firstParameter) => |
| 29 | firstParameter; |
no outgoing calls
no test coverage detected
searching dependent graphs…