Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash.intersection

Package Overview
Dependencies
Maintainers
4
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.intersection - npm Package Compare versions

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).

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc