UNPKG

745 BJavaScriptView Raw
1var _curry3 =
2/*#__PURE__*/
3require("./internal/_curry3");
4
5var is =
6/*#__PURE__*/
7require("./is");
8/**
9 * Returns `true` if the specified object property is of the given type;
10 * `false` otherwise.
11 *
12 * @func
13 * @memberOf R
14 * @since v0.16.0
15 * @category Type
16 * @sig Type -> String -> Object -> Boolean
17 * @param {Function} type
18 * @param {String} name
19 * @param {*} obj
20 * @return {Boolean}
21 * @see R.is, R.propSatisfies
22 * @example
23 *
24 * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true
25 * R.propIs(Number, 'x', {x: 'foo'}); //=> false
26 * R.propIs(Number, 'x', {}); //=> false
27 */
28
29
30var propIs =
31/*#__PURE__*/
32_curry3(function propIs(type, name, obj) {
33 return is(type, obj[name]);
34});
35
36module.exports = propIs;
\No newline at end of file