basant307/AI_Governance_Project
048
1import baseDifference from './_baseDifference.js';2import baseFlatten from './_baseFlatten.js';3import baseRest from './_baseRest.js';4import isArrayLikeObject from './isArrayLikeObject.js';5 6/**7 * Creates an array of `array` values not included in the other given arrays8 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)9 * for equality comparisons. The order and references of result values are10 * determined by the first array.11 *12 * **Note:** Unlike `_.pullAll`, this method returns a new array.13 *14 * @static15 * @memberOf _16 * @since 0.1.017 * @category Array18 * @param {Array} array The array to inspect.19 * @param {...Array} [values] The values to exclude.20 * @returns {Array} Returns the new array of filtered values.21 * @see _.without, _.xor22 * @example23 *24 * _.difference([2, 1], [2, 3]);25 * // => [1]26 */27var difference = baseRest(function(array, values) {28 return isArrayLikeObject(array)29 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))30 : [];31});32 33export default difference;34 