1 | import _includes from "./internal/_includes.js";
|
2 | import _curry2 from "./internal/_curry2.js";
|
3 | /**
|
4 | * Returns `true` if the specified value is equal, in [`R.equals`](#equals)
|
5 | * terms, to at least one element of the given list; `false` otherwise.
|
6 | * Works also with strings.
|
7 | *
|
8 | * @func
|
9 | * @memberOf R
|
10 | * @since v0.26.0
|
11 | * @category List
|
12 | * @sig a -> [a] -> Boolean
|
13 | * @param {Object} a The item to compare against.
|
14 | * @param {Array} list The array to consider.
|
15 | * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.
|
16 | * @see R.any
|
17 | * @example
|
18 | *
|
19 | * R.includes(3, [1, 2, 3]); //=> true
|
20 | * R.includes(4, [1, 2, 3]); //=> false
|
21 | * R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true
|
22 | * R.includes([42], [[42]]); //=> true
|
23 | * R.includes('ba', 'banana'); //=>true
|
24 | */
|
25 |
|
26 | var includes =
|
27 | /*#__PURE__*/
|
28 | _curry2(_includes);
|
29 |
|
30 | export default includes; |
\ | No newline at end of file |