mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-10 05:35:05 +08:00
DISABLE_THIRD_PARTY_CHECK=new npm module causes package-lock change We can get rid of a custom script and use ESLint for these rules. Additionally this means editors will highlight the issue in the editor. Change-Id: I552b52e7f07b4e7430b3f685dbc3b5fad36ffff2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2052167 Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
38 lines
1.2 KiB
JavaScript
38 lines
1.2 KiB
JavaScript
import curry from './curry.js';
|
|
|
|
/**
|
|
* Returns the result of calling its first argument with the remaining
|
|
* arguments. This is occasionally useful as a converging function for
|
|
* [`R.converge`](#converge): the first branch can produce a function while the
|
|
* remaining branches produce values to be passed to that function as its
|
|
* arguments.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.9.0
|
|
* @category Function
|
|
* @sig (*... -> a),*... -> a
|
|
* @param {Function} fn The function to apply to the remaining arguments.
|
|
* @param {...*} args Any number of positional arguments.
|
|
* @return {*}
|
|
* @see R.apply
|
|
* @example
|
|
*
|
|
* R.call(R.add, 1, 2); //=> 3
|
|
*
|
|
* const indentN = R.pipe(R.repeat(' '),
|
|
* R.join(''),
|
|
* R.replace(/^(?!$)/gm));
|
|
*
|
|
* const format = R.converge(R.call, [
|
|
* R.pipe(R.prop('indent'), indentN),
|
|
* R.prop('value')
|
|
* ]);
|
|
*
|
|
* format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n'
|
|
* @symb R.call(f, a, b) = f(a, b)
|
|
*/
|
|
var call = /*#__PURE__*/curry(function call(fn) {
|
|
return fn.apply(this, Array.prototype.slice.call(arguments, 1));
|
|
});
|
|
export default call; |