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

lodash.intersection

Package Overview
Dependencies
Maintainers
5
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 3.1.0 to 3.2.0

41

index.js
/**
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
* lodash 3.2.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`

@@ -11,3 +11,4 @@ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>

cacheIndexOf = require('lodash._cacheindexof'),
createCache = require('lodash._createcache');
createCache = require('lodash._createcache'),
restParam = require('lodash.restparam');

@@ -18,3 +19,3 @@ /**

*/
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
var MAX_SAFE_INTEGER = 9007199254740991;

@@ -84,7 +85,6 @@ /**

*/
function intersection() {
var args = [],
argsIndex = -1,
argsLength = arguments.length,
caches = [],
var intersection = restParam(function(arrays) {
var othLength = arrays.length,
othIndex = othLength,
caches = Array(length),
indexOf = baseIndexOf,

@@ -94,14 +94,7 @@ isCommon = true,

while (++argsIndex < argsLength) {
var value = arguments[argsIndex];
if (isArrayLike(value)) {
args.push(value);
caches.push((isCommon && value.length >= 120) ? createCache(argsIndex && value) : null);
}
while (othIndex--) {
var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : [];
caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null;
}
argsLength = args.length;
if (argsLength < 2) {
return result;
}
var array = args[0],
var array = arrays[0],
index = -1,

@@ -115,6 +108,6 @@ length = array ? array.length : 0,

if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) {
argsIndex = argsLength;
while (--argsIndex) {
var cache = caches[argsIndex];
if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value, 0)) < 0) {
var othIndex = othLength;
while (--othIndex) {
var cache = caches[othIndex];
if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) {
continue outer;

@@ -130,4 +123,4 @@ }

return result;
}
});
module.exports = intersection;
{
"name": "lodash.intersection",
"version": "3.1.0",
"version": "3.2.0",
"description": "The modern build of lodash’s `_.intersection` as a module.",

@@ -22,4 +22,5 @@ "homepage": "https://lodash.com/",

"lodash._cacheindexof": "^3.0.0",
"lodash._createcache": "^3.0.0"
"lodash._createcache": "^3.0.0",
"lodash.restparam": "^3.0.0"
}
}

@@ -1,2 +0,2 @@

# lodash.intersection v3.1.0
# lodash.intersection v3.2.0

@@ -20,2 +20,2 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.intersection` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.

See the [documentation](https://lodash.com/docs#intersection) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.intersection) for more details.
See the [documentation](https://lodash.com/docs#intersection) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.intersection) for more details.
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