source: node_modules/ramda/es/eqBy.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: 582 bytes
Line 
1import _curry3 from "./internal/_curry3.js";
2import equals from "./equals.js";
3/**
4 * Takes a function and two values in its domain and returns `true` if the
5 * values map to the same value in the codomain; `false` otherwise.
6 *
7 * @func
8 * @memberOf R
9 * @since v0.18.0
10 * @category Relation
11 * @sig (a -> b) -> a -> a -> Boolean
12 * @param {Function} f
13 * @param {*} x
14 * @param {*} y
15 * @return {Boolean}
16 * @example
17 *
18 * R.eqBy(Math.abs, 5, -5); //=> true
19 */
20
21var eqBy =
22/*#__PURE__*/
23_curry3(function eqBy(f, x, y) {
24 return equals(f(x), f(y));
25});
26
27export default eqBy;
Note: See TracBrowser for help on using the repository browser.