tap

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
1 KB
Runs the given function with the supplied object, then returns the object.
1 contributor
Install tap as a package?
Copied
npm i @bit/justin-capalbo.ramda.tap
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
tap (
fn:Function,
x:*
) : *

Runs the given function with the supplied object, then returns the object.

Acts as a transducer if a transformer is given as second parameter.

Example
const sayX = x => console.log('x is ' + x);
     R.tap(sayX, 100); //=> 100
     // logs 'x is 100'
Arguments
fn: Function

The function to call with x. The return value of fn will be thrown away.

x: *
Returns
*

`x`.

Help and resources