mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-12 17:45:49 +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>
29 lines
918 B
JavaScript
29 lines
918 B
JavaScript
import _curry1 from './internal/_curry1.js';
|
|
import liftN from './liftN.js';
|
|
|
|
/**
|
|
* "lifts" a function of arity > 1 so that it may "map over" a list, Function or other
|
|
* object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply).
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.7.0
|
|
* @category Function
|
|
* @sig (*... -> *) -> ([*]... -> [*])
|
|
* @param {Function} fn The function to lift into higher context
|
|
* @return {Function} The lifted function.
|
|
* @see R.liftN
|
|
* @example
|
|
*
|
|
* const madd3 = R.lift((a, b, c) => a + b + c);
|
|
*
|
|
* madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]
|
|
*
|
|
* const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e);
|
|
*
|
|
* madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24]
|
|
*/
|
|
var lift = /*#__PURE__*/_curry1(function lift(fn) {
|
|
return liftN(fn.length, fn);
|
|
});
|
|
export default lift; |