2 * This function is like `arrayIncludes` except that it accepts a comparator.
5 * @param {Array} [array] The array to inspect.
6 * @param {*} target The value to search for.
7 * @param {Function} comparator The comparator invoked per element.
8 * @returns {boolean} Returns `true` if `target` is found, else `false`.
10 function arrayIncludesWith(array, value, comparator) {
12 length = array == null ? 0 : array.length;
14 while (++index < length) {
15 if (comparator(value, array[index])) {
22 module.exports = arrayIncludesWith;