UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

20 lines (19 loc) 609 B
/** * Creates an array of unique values that are included in all given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. The order and references of result values are * determined by the first array. * * @since 5.11.0 * @category Array * @param arrays The arrays to inspect. * @returns Returns the new array of intersecting values. * @example * * ```js * intersection([2, 1], [2, 3]) * // => [2] * ``` */ export declare function intersection<T = any>(...arrays: Array<Array<T>>): Array<T>; export default intersection;