source: node_modules/ramda/src/propSatisfies.js

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: 767 bytes
RevLine 
[d24f17c]1var _curry3 =
2/*#__PURE__*/
3require("./internal/_curry3.js");
4
5var prop =
6/*#__PURE__*/
7require("./prop.js");
8/**
9 * Returns `true` if the specified object property satisfies the given
10 * predicate; `false` otherwise. You can test multiple properties with
11 * [`R.where`](#where).
12 *
13 * @func
14 * @memberOf R
15 * @since v0.16.0
16 * @category Logic
17 * @sig (a -> Boolean) -> String -> {String: a} -> Boolean
18 * @param {Function} pred
19 * @param {String} name
20 * @param {*} obj
21 * @return {Boolean}
22 * @see R.where, R.propEq, R.propIs
23 * @example
24 *
25 * R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true
26 */
27
28
29var propSatisfies =
30/*#__PURE__*/
31_curry3(function propSatisfies(pred, name, obj) {
32 return pred(prop(name, obj));
33});
34
35module.exports = propSatisfies;
Note: See TracBrowser for help on using the repository browser.