1 | var _curry2 =
|
2 | /*#__PURE__*/
|
3 | require("./internal/_curry2");
|
4 | /**
|
5 | * Returns whether or not an object or its prototype chain has a property with
|
6 | * the specified name
|
7 | *
|
8 | * @func
|
9 | * @memberOf R
|
10 | * @since v0.7.0
|
11 | * @category Object
|
12 | * @sig s -> {s: x} -> Boolean
|
13 | * @param {String} prop The name of the property to check for.
|
14 | * @param {Object} obj The object to query.
|
15 | * @return {Boolean} Whether the property exists.
|
16 | * @example
|
17 | *
|
18 | * function Rectangle(width, height) {
|
19 | * this.width = width;
|
20 | * this.height = height;
|
21 | * }
|
22 | * Rectangle.prototype.area = function() {
|
23 | * return this.width * this.height;
|
24 | * };
|
25 | *
|
26 | * const square = new Rectangle(2, 2);
|
27 | * R.hasIn('width', square); //=> true
|
28 | * R.hasIn('area', square); //=> true
|
29 | */
|
30 |
|
31 |
|
32 | var hasIn =
|
33 | /*#__PURE__*/
|
34 | _curry2(function hasIn(prop, obj) {
|
35 | return prop in obj;
|
36 | });
|
37 |
|
38 | module.exports = hasIn; |
\ | No newline at end of file |