source: node_modules/ramda/src/propIs.js@ 65b6638

main
Last change on this file since 65b6638 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 805 bytes
Line 
1var _curry3 =
2/*#__PURE__*/
3require("./internal/_curry3.js");
4
5var prop =
6/*#__PURE__*/
7require("./prop.js");
8
9var is =
10/*#__PURE__*/
11require("./is.js");
12/**
13 * Returns `true` if the specified object property is of the given type;
14 * `false` otherwise.
15 *
16 * @func
17 * @memberOf R
18 * @since v0.16.0
19 * @category Type
20 * @sig Type -> String -> Object -> Boolean
21 * @param {Function} type
22 * @param {String} name
23 * @param {*} obj
24 * @return {Boolean}
25 * @see R.is, R.propSatisfies
26 * @example
27 *
28 * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true
29 * R.propIs(Number, 'x', {x: 'foo'}); //=> false
30 * R.propIs(Number, 'x', {}); //=> false
31 */
32
33
34var propIs =
35/*#__PURE__*/
36_curry3(function propIs(type, name, obj) {
37 return is(type, prop(name, obj));
38});
39
40module.exports = propIs;
Note: See TracBrowser for help on using the repository browser.