mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 07:17:50 +00:00
Bump to v4.1.0.
This commit is contained in:
16
_arrayIncludes.js
Normal file
16
_arrayIncludes.js
Normal file
@@ -0,0 +1,16 @@
|
||||
var baseIndexOf = require('./_baseIndexOf');
|
||||
|
||||
/**
|
||||
* A specialized version of `_.includes` for arrays without support for
|
||||
* specifying an index to search from.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {*} target The value to search for.
|
||||
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||||
*/
|
||||
function arrayIncludes(array, value) {
|
||||
return !!array.length && baseIndexOf(array, value, 0) > -1;
|
||||
}
|
||||
|
||||
module.exports = arrayIncludes;
|
||||
Reference in New Issue
Block a user