use-with
v0.9.6arrow_drop_downv0.9.6
STATUS
Passing
DOWNLOADS
3
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
1 KB
Accepts a function `fn` and a list of transformer functions and returns a
new curried function.
1 contributor
Like
Install use-with as a package?
Copied
npm i @bit/justin-capalbo.ramda.use-with
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example modifieddraft
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
No preview available
chevron_left
chevron_right
useWith (
fn:
Function
,transformers:
) : Array
Function
Accepts a function fn
and a list of transformer functions and returns a
new curried function. When the new function is invoked, it calls the
function fn
with parameters consisting of the result of calling each
supplied handler on successive arguments to the new function.
If more arguments are passed to the returned function than transformer
functions, those arguments are passed directly to fn
as additional
parameters. If you expect additional arguments that don’t need to be
transformed, although you can ignore them, it’s best to pass an identity
function so that the new function reports the correct arity.
Example
Arguments
fn:
Function
The function to wrap.
transformers:
Array
A list of transformer functions
Returns
Function
The wrapped function.