UNPKG

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