[d24f17c] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | exports.__esModule = true;
|
---|
| 4 | exports["default"] = void 0;
|
---|
| 5 | var _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 | */
|
---|
| 26 | var allIdenticalTo = (0, _ramda.curry)(function (val, list) {
|
---|
| 27 | return (0, _ramda.all)((0, _ramda.identical)(val), list);
|
---|
| 28 | });
|
---|
| 29 | var _default = allIdenticalTo;
|
---|
| 30 | exports["default"] = _default; |
---|