UNPKG

291 BJavaScriptView Raw
1import { curry } from './curry'
2import { equals } from './equals'
3
4function eqPropsFn(
5 prop, obj1, obj2
6){
7 if (!obj1 || !obj2){
8 throw new Error('wrong object inputs are passed to R.eqProps')
9 }
10
11 return equals(obj1[ prop ], obj2[ prop ])
12}
13
14export const eqProps = curry(eqPropsFn)