main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
524 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import baseIndexOf from './_baseIndexOf.js';
|
---|
| 2 |
|
---|
| 3 | /**
|
---|
| 4 | * A specialized version of `_.includes` for arrays without support for
|
---|
| 5 | * specifying an index to search from.
|
---|
| 6 | *
|
---|
| 7 | * @private
|
---|
| 8 | * @param {Array} [array] The array to inspect.
|
---|
| 9 | * @param {*} target The value to search for.
|
---|
| 10 | * @returns {boolean} Returns `true` if `target` is found, else `false`.
|
---|
| 11 | */
|
---|
| 12 | function arrayIncludes(array, value) {
|
---|
| 13 | var length = array == null ? 0 : array.length;
|
---|
| 14 | return !!length && baseIndexOf(array, value, 0) > -1;
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | export default arrayIncludes;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.