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
|
Rev | Line | |
---|
[d24f17c] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | exports.__esModule = true;
|
---|
| 4 | exports["default"] = void 0;
|
---|
| 5 | var _ramda = require("ramda");
|
---|
| 6 | /**
|
---|
| 7 | * Returns true if the specified value is equal, in R.equals terms,
|
---|
| 8 | * to at least one element of the given list or false otherwise.
|
---|
| 9 | * Given list can be a string.
|
---|
| 10 | *
|
---|
| 11 | * Like {@link http://ramdajs.com/docs/#includes|R.includes} but with argument order reversed.
|
---|
| 12 | *
|
---|
| 13 | * @func included
|
---|
| 14 | * @memberOf RA
|
---|
| 15 | * @since {@link https://char0n.github.io/ramda-adjunct/3.0.0|v3.0.0}
|
---|
| 16 | * @category List
|
---|
| 17 | * @sig [a] -> a -> Boolean
|
---|
| 18 | * @param {Array|String} list The list to consider
|
---|
| 19 | * @param {*} a The item to compare against
|
---|
| 20 | * @return {boolean} Returns Boolean `true` if an equivalent item is in the list or `false` otherwise
|
---|
| 21 | * @see {@link http://ramdajs.com/docs/#includes|R.includes}
|
---|
| 22 | * @example
|
---|
| 23 | *
|
---|
| 24 | * RA.included([1, 2, 3], 3); //=> true
|
---|
| 25 | * RA.included([1, 2, 3], 4); //=> false
|
---|
| 26 | * RA.included([{ name: 'Fred' }], { name: 'Fred' }); //=> true
|
---|
| 27 | * RA.included([[42]], [42]); //=> true
|
---|
| 28 | */
|
---|
| 29 | var included = (0, _ramda.flip)(_ramda.includes);
|
---|
| 30 | var _default = included;
|
---|
| 31 | exports["default"] = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.