mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-08 20:58:24 +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>
30 lines
951 B
JavaScript
30 lines
951 B
JavaScript
import _arity from './internal/_arity.js';
|
|
import _pipeP from './internal/_pipeP.js';
|
|
import reduce from './reduce.js';
|
|
import tail from './tail.js';
|
|
|
|
/**
|
|
* Performs left-to-right composition of one or more Promise-returning
|
|
* functions. The leftmost function may have any arity; the remaining functions
|
|
* must be unary.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.10.0
|
|
* @category Function
|
|
* @sig ((a -> Promise b), (b -> Promise c), ..., (y -> Promise z)) -> (a -> Promise z)
|
|
* @param {...Function} functions
|
|
* @return {Function}
|
|
* @see R.composeP
|
|
* @deprecated since v0.26.0
|
|
* @example
|
|
*
|
|
* // followersForUser :: String -> Promise [User]
|
|
* const followersForUser = R.pipeP(db.getUserById, db.getFollowers);
|
|
*/
|
|
export default function pipeP() {
|
|
if (arguments.length === 0) {
|
|
throw new Error('pipeP requires at least one argument');
|
|
}
|
|
return _arity(arguments[0].length, reduce(_pipeP, arguments[0], tail(arguments)));
|
|
} |