mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Remove semicolons.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import arrayMap from './.internal/arrayMap.js';
|
||||
import baseIntersection from './.internal/baseIntersection.js';
|
||||
import castArrayLikeObject from './.internal/castArrayLikeObject.js';
|
||||
import arrayMap from './.internal/arrayMap.js'
|
||||
import baseIntersection from './.internal/baseIntersection.js'
|
||||
import castArrayLikeObject from './.internal/castArrayLikeObject.js'
|
||||
|
||||
/**
|
||||
* Creates an array of unique values that are included in all given arrays
|
||||
@@ -14,14 +14,14 @@ import castArrayLikeObject from './.internal/castArrayLikeObject.js';
|
||||
* @returns {Array} Returns the new array of intersecting values.
|
||||
* @example
|
||||
*
|
||||
* intersection([2, 1], [2, 3]);
|
||||
* intersection([2, 1], [2, 3])
|
||||
* // => [2]
|
||||
*/
|
||||
function intersection(...arrays) {
|
||||
const mapped = arrayMap(arrays, castArrayLikeObject);
|
||||
const mapped = arrayMap(arrays, castArrayLikeObject)
|
||||
return (mapped.length && mapped[0] === arrays[0])
|
||||
? baseIntersection(mapped)
|
||||
: [];
|
||||
: []
|
||||
}
|
||||
|
||||
export default intersection;
|
||||
export default intersection
|
||||
|
||||
Reference in New Issue
Block a user