source: node_modules/ramda-adjunct/lib/allIdenticalTo.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: 1022 bytes
Line 
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5var _ramda = require("ramda");
6/**
7 * Returns true if all items in the list are equivalent to user provided value using `R.identical` for equality comparisons.
8 *
9 * @func allIdenticalTo
10 * @memberOf RA
11 * @since {@link https://char0n.github.io/ramda-adjunct/2.11.0|v2.11.0}
12 * @category List
13 * @sig a -> [b] -> Boolean
14 * @param {*} val User provided value to check the `list` against
15 * @param {Array} list The list of values
16 * @return {boolean}
17 * @see {@link RA.allIdentical|allIdentical}, {@link http://ramdajs.com/docs/#identical|R.identical}
18 * @example
19 *
20 * RA.allIdenticalTo(1, [ 1, 2, 3, 4 ]); //=> false
21 * RA.allIdenticalTo(1, [ 1, 1, 1, 1 ]); //=> true
22 * RA.allIdenticalTo(1, []); //=> true
23 * RA.allIdenticalTo({}, [ {}, {} ]); //=> false
24 *
25 */
26var allIdenticalTo = (0, _ramda.curry)(function (val, list) {
27 return (0, _ramda.all)((0, _ramda.identical)(val), list);
28});
29var _default = allIdenticalTo;
30exports["default"] = _default;
Note: See TracBrowser for help on using the repository browser.