swc/bundler/tests/.cache/deno/1d2e15181dc539bfe8e9784b45df9eb58aa1bd10.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00

34 lines
865 B
TypeScript

// Loaded from https://deno.land/x/ramda@v0.27.2/source/tap.js
import _curry2 from './internal/_curry2.js';
import _dispatchable from './internal/_dispatchable.js';
import _xtap from './internal/_xtap.js';
/**
* Runs the given function with the supplied object, then returns the object.
*
* Acts as a transducer if a transformer is given as second parameter.
*
* @func
* @memberOf R
* @since v0.1.0
* @category Function
* @sig (a -> *) -> a -> a
* @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away.
* @param {*} x
* @return {*} `x`.
* @example
*
* const sayX = x => console.log('x is ' + x);
* R.tap(sayX, 100); //=> 100
* // logs 'x is 100'
* @symb R.tap(f, a) = a
*/
var tap = _curry2(_dispatchable([], _xtap, function tap(fn, x) {
fn(x);
return x;
}));
export default tap;