This commit is contained in:
Dawid Dziurla 2020-03-26 15:37:35 +01:00
parent d9becc67b6
commit 9308795b8b
No known key found for this signature in database
GPG key ID: 7B6D8368172E9B0B
964 changed files with 104265 additions and 16 deletions

31
node_modules/ramda/es/pipeP.js generated vendored Normal file
View file

@ -0,0 +1,31 @@
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 first argument may have any arity; the remaining arguments
* 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)));
}