UNPKG

@naverpay/hidash

Version:
14 lines (12 loc) 601 B
/** * @description * Creates an array of `array` values not included in the other given arrays. * This implementation utilizes a `Set` for improved performance when checking for exclusions, * offering O(1) average time complexity for lookups. * * @param {ArrayLike<T> | null | undefined} array - The array to inspect. * @param {...ArrayLike<T>[]} values - The values to exclude. * @returns {T[]} Returns the new array of filtered values. */ declare function difference<T>(array: ArrayLike<T> | null | undefined, ...values: ArrayLike<T>[]): T[]; export { difference as default, difference };