lodash.intersection
Advanced tools
Comparing version 2.3.0 to 2.4.0
33
index.js
/** | ||
* Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/> | ||
* Lo-Dash 2.4.0 (Custom Build) <http://lodash.com/> | ||
* Build: `lodash modularize modern exports="npm" -o ./npm/` | ||
@@ -13,2 +13,4 @@ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> | ||
getArray = require('lodash._getarray'), | ||
isArguments = require('lodash.isarguments'), | ||
isArray = require('lodash.isarray'), | ||
largeArraySize = require('lodash._largearraysize'), | ||
@@ -26,25 +28,30 @@ releaseArray = require('lodash._releasearray'), | ||
* @param {...Array} [array] The arrays to inspect. | ||
* @returns {Array} Returns an array of composite values. | ||
* @returns {Array} Returns an array of shared values. | ||
* @example | ||
* | ||
* _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); | ||
* _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]); | ||
* // => [1, 2] | ||
*/ | ||
function intersection(array) { | ||
var args = arguments, | ||
argsLength = args.length, | ||
function intersection() { | ||
var args = [], | ||
argsIndex = -1, | ||
argsLength = arguments.length, | ||
caches = getArray(), | ||
index = -1, | ||
indexOf = baseIndexOf, | ||
length = array ? array.length : 0, | ||
result = [], | ||
trustIndexOf = indexOf === baseIndexOf, | ||
seen = getArray(); | ||
while (++argsIndex < argsLength) { | ||
var value = args[argsIndex]; | ||
caches[argsIndex] = indexOf === baseIndexOf && | ||
(value ? value.length : 0) >= largeArraySize && | ||
createCache(argsIndex ? args[argsIndex] : seen); | ||
var value = arguments[argsIndex]; | ||
if (isArray(value) || isArguments(value)) { | ||
args.push(value); | ||
caches.push(trustIndexOf && value.length >= largeArraySize && | ||
createCache(argsIndex ? args[argsIndex] : seen)); | ||
} | ||
} | ||
var array = args[0], | ||
index = -1, | ||
length = array ? array.length : 0, | ||
result = []; | ||
outer: | ||
@@ -51,0 +58,0 @@ while (++index < length) { |
{ | ||
"name": "lodash.intersection", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "The Lo-Dash function `_.intersection` as a Node.js module generated by lodash-cli.", | ||
@@ -18,10 +18,12 @@ "homepage": "http://lodash.com/custom-builds", | ||
"dependencies": { | ||
"lodash._baseindexof": "~2.3.0", | ||
"lodash._cacheindexof": "~2.3.0", | ||
"lodash._createcache": "~2.3.0", | ||
"lodash._getarray": "~2.3.0", | ||
"lodash._largearraysize": "~2.3.0", | ||
"lodash._releasearray": "~2.3.0", | ||
"lodash._releaseobject": "~2.3.0" | ||
"lodash._baseindexof": "~2.4.0", | ||
"lodash._cacheindexof": "~2.4.0", | ||
"lodash._createcache": "~2.4.0", | ||
"lodash._getarray": "~2.4.0", | ||
"lodash.isarguments": "~2.4.0", | ||
"lodash.isarray": "~2.4.0", | ||
"lodash._largearraysize": "~2.4.0", | ||
"lodash._releasearray": "~2.4.0", | ||
"lodash._releaseobject": "~2.4.0" | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# lodash.intersection v2.3.0 | ||
# lodash.intersection v2.4.0 | ||
@@ -3,0 +3,0 @@ The [Lo-Dash](http://lodash.com/) function [`_.intersection`](http://lodash.com/docs#intersection) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6066
78
9
+ Addedlodash.isarguments@~2.4.0
+ Addedlodash.isarray@~2.4.0
+ Addedlodash._arraypool@2.4.1(transitive)
+ Addedlodash._baseindexof@2.4.1(transitive)
+ Addedlodash._cacheindexof@2.4.1(transitive)
+ Addedlodash._cachepush@2.4.1(transitive)
+ Addedlodash._createcache@2.4.1(transitive)
+ Addedlodash._getarray@2.4.1(transitive)
+ Addedlodash._getobject@2.4.1(transitive)
+ Addedlodash._isnative@2.4.1(transitive)
+ Addedlodash._keyprefix@2.4.2(transitive)
+ Addedlodash._largearraysize@2.4.1(transitive)
+ Addedlodash._maxpoolsize@2.4.1(transitive)
+ Addedlodash._objectpool@2.4.1(transitive)
+ Addedlodash._releasearray@2.4.1(transitive)
+ Addedlodash._releaseobject@2.4.1(transitive)
+ Addedlodash.isarguments@2.4.1(transitive)
+ Addedlodash.isarray@2.4.1(transitive)
- Removedlodash._arraypool@2.3.0(transitive)
- Removedlodash._baseindexof@2.3.0(transitive)
- Removedlodash._cacheindexof@2.3.0(transitive)
- Removedlodash._cachepush@2.3.0(transitive)
- Removedlodash._createcache@2.3.0(transitive)
- Removedlodash._getarray@2.3.0(transitive)
- Removedlodash._getobject@2.3.0(transitive)
- Removedlodash._keyprefix@2.3.0(transitive)
- Removedlodash._largearraysize@2.3.0(transitive)
- Removedlodash._maxpoolsize@2.3.0(transitive)
- Removedlodash._objectpool@2.3.0(transitive)
- Removedlodash._releasearray@2.3.0(transitive)
- Removedlodash._releaseobject@2.3.0(transitive)
Updatedlodash._baseindexof@~2.4.0
Updatedlodash._cacheindexof@~2.4.0
Updatedlodash._createcache@~2.4.0
Updatedlodash._getarray@~2.4.0
Updatedlodash._releasearray@~2.4.0
Updatedlodash._releaseobject@~2.4.0