eq-props

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
2 KB
Reports whether two objects have the same value, in [`R.equals`](#equals) terms, for the specified property.
1 contributor
Install eq-props as a package?
Copied
npm i @bit/justin-capalbo.ramda.eq-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
eqProps (
prop:String,
obj1:Object,
obj2:Object
) : Boolean

Reports whether two objects have the same value, in R.equals terms, for the specified property. Useful as a curried predicate.

Example
const o1 = { a: 1, b: 2, c: 3, d: 4 };
     const o2 = { a: 10, b: 20, c: 3, d: 40 };
     R.eqProps('a', o1, o2); //=> false
     R.eqProps('c', o1, o2); //=> true
Arguments
prop: String

The name of the property to compare

obj1: Object
obj2: Object
Returns
Boolean

Help and resources