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