ramda-adjunct
Version:
Ramda Adjunct is the most popular and most comprehensive set of utilities for use with Ramda, providing a variety of useful, well tested functions with excellent documentation.
28 lines (27 loc) • 1.07 kB
JavaScript
exports.__esModule = true;
exports["default"] = void 0;
var _ramda = require("ramda");
var _lengthLte = _interopRequireDefault(require("./lengthLte.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* Returns true if all items in the list are equivalent using `R.identical` for equality comparisons.
*
* @func allIdentical
* @memberOf RA
* @since {@link https://char0n.github.io/ramda-adjunct/2.11.0|v2.11.0}
* @category List
* @sig [a] -> Boolean
* @param {Array} list The list of values
* @return {boolean}
* @see {@link https://ramdajs.com/docs/#identical|identical}
* @example
*
* RA.allIdentical([ 1, 2, 3, 4 ]); //=> false
* RA.allIdentical([ 1, 1, 1, 1 ]); //=> true
* RA.allIdentical([]); //=> true
* RA.allIdentical([ {}, {} ]); //=> false
* RA.allIdentical([ () => {}, () => {} ]); //=> false
*/
var allIdentical = (0, _ramda.curryN)(1, (0, _ramda.pipe)((0, _ramda.uniqWith)(_ramda.identical), (0, _lengthLte["default"])(1)));
var _default = exports["default"] = allIdentical;
;