mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-14 18:45:00 +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>
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
var _curry2 = /*#__PURE__*/require('./internal/_curry2');
|
|
|
|
var pipeWith = /*#__PURE__*/require('./pipeWith');
|
|
|
|
var reverse = /*#__PURE__*/require('./reverse');
|
|
|
|
/**
|
|
* Performs right-to-left function composition using transforming function. The rightmost function may have
|
|
* any arity; the remaining functions must be unary.
|
|
*
|
|
* **Note:** The result of compose is not automatically curried.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @category Function
|
|
* @sig ((* -> *), [(y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)]) -> ((a, b, ..., n) -> z)
|
|
* @param {...Function} ...functions The functions to compose
|
|
* @return {Function}
|
|
* @see R.compose, R.pipeWith
|
|
* @example
|
|
*
|
|
* const composeWhileNotNil = R.composeWith((f, res) => R.isNil(res) ? res : f(res));
|
|
*
|
|
* composeWhileNotNil([R.inc, R.prop('age')])({age: 1}) //=> 2
|
|
* composeWhileNotNil([R.inc, R.prop('age')])({}) //=> undefined
|
|
*
|
|
* @symb R.composeWith(f)([g, h, i])(...args) = f(g, f(h, f(i, ...args)))
|
|
*/
|
|
|
|
|
|
var composeWith = /*#__PURE__*/_curry2(function composeWith(xf, list) {
|
|
return pipeWith.apply(this, [xf, reverse(list)]);
|
|
});
|
|
module.exports = composeWith; |