unapply

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
705 B
Takes a function `fn`, which takes a single array argument, and returns a
1 contributor
Install unapply as a package?
Copied
npm i @bit/justin-capalbo.ramda.unapply
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
unapply (
fn:Function
) : Function

Takes a function fn, which takes a single array argument, and returns a function which:

  • takes any number of positional arguments;
  • passes these arguments to fn as an array; and
  • returns the result.

In other words, R.unapply derives a variadic function from a function which takes an array. R.unapply is the inverse of R.apply.

Example
R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]'
Argument
fn: Function
Returns
Function

Help and resources