pipe-with

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
3
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
2 KB
Performs left-to-right function composition using transforming function.
1 contributor
Install pipe-with as a package?
Copied
npm i @bit/justin-capalbo.ramda.pipe-with
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
pipeWith (
functions:...Function
) : Function

Performs left-to-right function composition using transforming function. The leftmost function may have any arity; the remaining functions must be unary.

Note: The result of pipeWith is not automatically curried.

Example
const pipeWhileNotNil = R.pipeWith((f, res) => R.isNil(res) ? res : f(res));
     const f = pipeWhileNotNil([Math.pow, R.negate, R.inc])

     f(3, 4); // -(3^4) + 1
Argument
functions: ...Function
Returns
Function

Help and resources