Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/compat/array/differenceBy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,21 @@
* Computes the difference between an array and multiple arrays using an iteratee function.
*
* @template T
* @param arr - The primary array from which to derive the difference.
* @param array - The primary array from which to derive the difference.
* @param values - Multiple arrays containing elements to be excluded from the primary array.
* @returns A new array containing the elements that are present in the primary array but not in the values arrays.
*/
export function differenceBy<T>(arr: ArrayLike<T> | null | undefined, ..._values: any[]): T[] {
if (!isArrayLikeObject(arr)) {
export function differenceBy<T>(array: ArrayLike<T> | null | undefined, ..._values: any[]): T[] {

Check warning on line 166 in src/compat/array/differenceBy.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
if (!isArrayLikeObject(array)) {
return [];
}

const iteratee = last(_values);
const values = flattenArrayLike<T>(_values);

if (isArrayLikeObject(iteratee)) {
return differenceToolkit(Array.from(arr), values);
return differenceToolkit(Array.from(array), values);
}

return differenceByToolkit(Array.from(arr), values, createIteratee(iteratee));
return differenceByToolkit(Array.from(array), values, createIteratee(iteratee));
}