main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
848 bytes
|
Line | |
---|
1 | var _curry3 =
|
---|
2 | /*#__PURE__*/
|
---|
3 | require("./internal/_curry3.js");
|
---|
4 |
|
---|
5 | var equals =
|
---|
6 | /*#__PURE__*/
|
---|
7 | require("./equals.js");
|
---|
8 | /**
|
---|
9 | * Reports whether two objects have the same value, in [`R.equals`](#equals)
|
---|
10 | * terms, for the specified property. Useful as a curried predicate.
|
---|
11 | *
|
---|
12 | * @func
|
---|
13 | * @memberOf R
|
---|
14 | * @since v0.1.0
|
---|
15 | * @category Object
|
---|
16 | * @sig k -> {k: v} -> {k: v} -> Boolean
|
---|
17 | * @param {String} prop The name of the property to compare
|
---|
18 | * @param {Object} obj1
|
---|
19 | * @param {Object} obj2
|
---|
20 | * @return {Boolean}
|
---|
21 | *
|
---|
22 | * @example
|
---|
23 | *
|
---|
24 | * const o1 = { a: 1, b: 2, c: 3, d: 4 };
|
---|
25 | * const o2 = { a: 10, b: 20, c: 3, d: 40 };
|
---|
26 | * R.eqProps('a', o1, o2); //=> false
|
---|
27 | * R.eqProps('c', o1, o2); //=> true
|
---|
28 | */
|
---|
29 |
|
---|
30 |
|
---|
31 | var eqProps =
|
---|
32 | /*#__PURE__*/
|
---|
33 | _curry3(function eqProps(prop, obj1, obj2) {
|
---|
34 | return equals(obj1[prop], obj2[prop]);
|
---|
35 | });
|
---|
36 |
|
---|
37 | module.exports = eqProps; |
---|
Note:
See
TracBrowser
for help on using the repository browser.