props

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
827 B
Acts as multiple `prop`: array of keys in, array of values out.
1 contributor
Install props as a package?
Copied
npm i @bit/justin-capalbo.ramda.props
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
props (
ps:Array,
obj:Object
) : Array

Acts as multiple prop: array of keys in, array of values out. Preserves order.

Example
R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2]
     R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2]

     const fullName = R.compose(R.join(' '), R.props(['first', 'last']));
     fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth'
Arguments
ps: Array

The property names to fetch

obj: Object

The object to query

Returns
Array

The corresponding values or partially applied function.

Help and resources