obj-of

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
4
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
805 B
Creates an object containing a single key:value pair.
1 contributor
Install obj-of as a package?
Copied
npm i @bit/justin-capalbo.ramda.obj-of
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
objOf (
key:String,
val:*
) : Object

Creates an object containing a single key:value pair.

Example
const matchPhrases = R.compose(
       R.objOf('must'),
       R.map(R.objOf('match_phrase'))
     );
     matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]}
Arguments
key: String
val: *
Returns
Object

Help and resources