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

lodash-es

Package Overview
Dependencies
Maintainers
3
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash-es - npm Package Compare versions

Comparing version 4.5.1 to 4.6.0

_baseIndexOfWith.js

1

_addMapEntry.js

@@ -10,2 +10,3 @@ /**

function addMapEntry(map, pair) {
// Don't return `Map#set` because it doesn't return the map instance in IE 11.
map.set(pair[0], pair[1]);

@@ -12,0 +13,0 @@ return map;

4

_arrayFilter.js

@@ -13,3 +13,3 @@ /**

length = array.length,
resIndex = -1,
resIndex = 0,
result = [];

@@ -20,3 +20,3 @@

if (predicate(value, index, array)) {
result[++resIndex] = value;
result[resIndex++] = value;
}

@@ -23,0 +23,0 @@ }

/**
* A specialized version of `_.includesWith` for arrays without support for
* specifying an index to search from.
* This function is like `arrayIncludes` except that it accepts a comparator.
*

@@ -5,0 +4,0 @@ * @private

import eq from './eq';
/**
* This function is like `assignValue` except that it doesn't assign `undefined` values.
* This function is like `assignValue` except that it doesn't assign
* `undefined` values.
*

@@ -6,0 +7,0 @@ * @private

@@ -8,2 +8,5 @@ import SetCache from './_SetCache';

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMin = Math.min;
/**

@@ -21,5 +24,7 @@ * The base implementation of methods like `_.intersection`, without support

var includes = comparator ? arrayIncludesWith : arrayIncludes,
length = arrays[0].length,
othLength = arrays.length,
othIndex = othLength,
caches = Array(othLength),
maxLength = Infinity,
result = [];

@@ -32,3 +37,4 @@

}
caches[othIndex] = !comparator && (iteratee || array.length >= 120)
maxLength = nativeMin(array.length, maxLength);
caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
? new SetCache(othIndex && array)

@@ -40,7 +46,6 @@ : undefined;

var index = -1,
length = array.length,
seen = caches[0];
outer:
while (++index < length) {
while (++index < length && result.length < maxLength) {
var value = array[index],

@@ -53,3 +58,3 @@ computed = iteratee ? iteratee(value) : value;

)) {
var othIndex = othLength;
othIndex = othLength;
while (--othIndex) {

@@ -56,0 +61,0 @@ var cache = caches[othIndex];

@@ -46,15 +46,7 @@ import Stack from './_Stack';

objTag = getTag(object);
if (objTag == argsTag) {
objTag = objectTag;
} else if (objTag != objectTag) {
objIsArr = isTypedArray(object);
}
objTag = objTag == argsTag ? objectTag : objTag;
}
if (!othIsArr) {
othTag = getTag(other);
if (othTag == argsTag) {
othTag = objectTag;
} else if (othTag != objectTag) {
othIsArr = isTypedArray(other);
}
othTag = othTag == argsTag ? objectTag : othTag;
}

@@ -65,7 +57,9 @@ var objIsObj = objTag == objectTag && !isHostObject(object),

if (isSameTag && !(objIsArr || objIsObj)) {
return equalByTag(object, other, objTag, equalFunc, customizer, bitmask);
if (isSameTag && !objIsObj) {
stack || (stack = new Stack);
return (objIsArr || isTypedArray(object))
? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
: equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
}
var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
if (!isPartial) {
if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),

@@ -75,2 +69,3 @@ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');

if (objIsWrapped || othIsWrapped) {
stack || (stack = new Stack);
return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack);

@@ -83,5 +78,5 @@ }

stack || (stack = new Stack);
return (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack);
return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
}
export default baseIsEqualDeep;

@@ -53,3 +53,3 @@ import assignMergeValue from './_assignMergeValue';

isCommon = false;
newValue = baseClone(srcValue, true);
newValue = baseClone(srcValue, !customizer);
}

@@ -63,3 +63,3 @@ }

isCommon = false;
newValue = baseClone(srcValue, true);
newValue = baseClone(srcValue, !customizer);
}

@@ -80,2 +80,3 @@ else {

}
stack['delete'](srcValue);
assignMergeValue(object, key, newValue);

@@ -82,0 +83,0 @@ }

@@ -17,9 +17,5 @@ import arrayMap from './_arrayMap';

function baseOrderBy(collection, iteratees, orders) {
var index = -1,
toIteratee = baseIteratee;
var index = -1;
iteratees = arrayMap(iteratees.length ? iteratees : Array(1), baseIteratee);
iteratees = arrayMap(iteratees.length ? iteratees : Array(1), function(iteratee) {
return toIteratee(iteratee);
});
var result = baseMap(collection, function(value, key, collection) {

@@ -26,0 +22,0 @@ var criteria = arrayMap(iteratees, function(iteratee) {

@@ -1,5 +0,15 @@

import basePullAllBy from './_basePullAllBy';
import arrayMap from './_arrayMap';
import baseIndexOf from './_baseIndexOf';
import baseIndexOfWith from './_baseIndexOfWith';
import baseUnary from './_baseUnary';
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* The base implementation of `_.pullAll`.
* The base implementation of `_.pullAllBy` without support for iteratee
* shorthands.
*

@@ -9,8 +19,30 @@ * @private

* @param {Array} values The values to remove.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns `array`.
*/
function basePullAll(array, values) {
return basePullAllBy(array, values);
function basePullAll(array, values, iteratee, comparator) {
var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
index = -1,
length = values.length,
seen = array;
if (iteratee) {
seen = arrayMap(array, baseUnary(iteratee));
}
while (++index < length) {
var fromIndex = 0,
value = values[index],
computed = iteratee ? iteratee(value) : value;
while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
if (seen !== array) {
splice.call(seen, fromIndex, 1);
}
splice.call(array, fromIndex, 1);
}
}
return array;
}
export default basePullAll;
/**
* The base implementation of `_.sortBy` which uses `comparer` to define
* the sort order of `array` and replaces criteria objects with their
* corresponding values.
* The base implementation of `_.sortBy` which uses `comparer` to define the
* sort order of `array` and replaces criteria objects with their corresponding
* values.
*

@@ -6,0 +6,0 @@ * @private

@@ -18,3 +18,3 @@ import eq from './eq';

seen = computed,
resIndex = 0,
resIndex = 1,
result = [value];

@@ -28,3 +28,3 @@

seen = computed;
result[++resIndex] = value;
result[resIndex++] = value;
}

@@ -31,0 +31,0 @@ }

@@ -11,7 +11,4 @@ import Uint8Array from './_Uint8Array';

function cloneArrayBuffer(arrayBuffer) {
var Ctor = arrayBuffer.constructor,
result = new Ctor(arrayBuffer.byteLength),
view = new Uint8Array(result);
view.set(new Uint8Array(arrayBuffer));
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
return result;

@@ -18,0 +15,0 @@ }

@@ -13,5 +13,3 @@ /**

}
var Ctor = buffer.constructor,
result = new Ctor(buffer.length);
var result = new buffer.constructor(buffer.length);
buffer.copy(result);

@@ -18,0 +16,0 @@ return result;

@@ -13,6 +13,5 @@ import addMapEntry from './_addMapEntry';

function cloneMap(map) {
var Ctor = map.constructor;
return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
return arrayReduce(mapToArray(map), addMapEntry, new map.constructor);
}
export default cloneMap;

@@ -12,5 +12,3 @@ /** Used to match `RegExp` flags from their coerced string values. */

function cloneRegExp(regexp) {
var Ctor = regexp.constructor,
result = new Ctor(regexp.source, reFlags.exec(regexp));
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;

@@ -17,0 +15,0 @@ return result;

@@ -13,6 +13,5 @@ import addSetEntry from './_addSetEntry';

function cloneSet(set) {
var Ctor = set.constructor;
return arrayReduce(setToArray(set), addSetEntry, new Ctor);
return arrayReduce(setToArray(set), addSetEntry, new set.constructor);
}
export default cloneSet;

@@ -5,3 +5,3 @@ import Symbol from './_Symbol';

var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;

@@ -16,5 +16,5 @@ /**

function cloneSymbol(symbol) {
return Symbol ? Object(symbolValueOf.call(symbol)) : {};
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
export default cloneSymbol;

@@ -12,9 +12,6 @@ import cloneArrayBuffer from './_cloneArrayBuffer';

function cloneTypedArray(typedArray, isDeep) {
var arrayBuffer = typedArray.buffer,
buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer,
Ctor = typedArray.constructor;
return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
export default cloneTypedArray;

@@ -9,2 +9,8 @@ import LodashWrapper from './_LodashWrapper';

/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/** Used to compose bitmasks for wrapper metadata. */

@@ -16,8 +22,2 @@ var CURRY_FLAG = 8,

/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**

@@ -24,0 +24,0 @@ * Creates a `_.flow` or `_.flowRight` function.

@@ -11,2 +11,5 @@ import baseSetData from './_baseSetData';

/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/** Used to compose bitmasks for wrapper metadata. */

@@ -20,5 +23,2 @@ var BIND_FLAG = 1,

/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/* Built-in method references for those with the same name as other `lodash` methods. */

@@ -25,0 +25,0 @@ var nativeMax = Math.max;

@@ -15,5 +15,5 @@ import arraySome from './_arraySome';

* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} [customizer] The function to customize comparisons.
* @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
* @param {Object} [stack] Tracks traversed `array` and `other` objects.
* @param {Function} customizer The function to customize comparisons.
* @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
* @param {Object} stack Tracks traversed `array` and `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.

@@ -20,0 +20,0 @@ */

import Symbol from './_Symbol';
import Uint8Array from './_Uint8Array';
import equalArrays from './_equalArrays';
import mapToArray from './_mapToArray';

@@ -25,3 +26,3 @@ import setToArray from './_setToArray';

var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;

@@ -40,7 +41,8 @@ /**

* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} [customizer] The function to customize comparisons.
* @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {
function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
switch (tag) {

@@ -80,8 +82,17 @@ case arrayBufferTag:

if (object.size != other.size && !isPartial) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
// Recursively compare objects (susceptible to call stack limits).
return (isPartial || object.size == other.size) &&
equalFunc(convert(object), convert(other), customizer, bitmask | UNORDERED_COMPARE_FLAG);
return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask | UNORDERED_COMPARE_FLAG, stack.set(object, other));
case symbolTag:
return !!Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other));
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}

@@ -88,0 +99,0 @@ return false;

@@ -15,5 +15,5 @@ import baseHas from './_baseHas';

* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} [customizer] The function to customize comparisons.
* @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
* @param {Function} customizer The function to customize comparisons.
* @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.

@@ -20,0 +20,0 @@ */

@@ -12,3 +12,3 @@ import isNative from './isNative';

function getNative(object, key) {
var value = object == null ? undefined : object[key];
var value = object[key];
return isNative(value) ? value : undefined;

@@ -15,0 +15,0 @@ }

import baseCreate from './_baseCreate';
import isFunction from './isFunction';
import isPrototype from './_isPrototype';

@@ -16,3 +15,3 @@

function initCloneObject(object) {
return (isFunction(object.constructor) && !isPrototype(object))
return (typeof object.constructor == 'function' && !isPrototype(object))
? baseCreate(getPrototypeOf(object))

@@ -19,0 +18,0 @@ : {};

@@ -1,3 +0,1 @@

import isFunction from './isFunction';
/** Used for built-in method references. */

@@ -15,3 +13,3 @@ var objectProto = Object.prototype;

var Ctor = value && value.constructor,
proto = (isFunction(Ctor) && Ctor.prototype) || objectProto;
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;

@@ -18,0 +16,0 @@ return value === proto;

@@ -6,2 +6,5 @@ import composeArgs from './_composeArgs';

/** Used as the internal argument placeholder. */
var PLACEHOLDER = '__lodash_placeholder__';
/** Used to compose bitmasks for wrapper metadata. */

@@ -15,5 +18,2 @@ var BIND_FLAG = 1,

/** Used as the internal argument placeholder. */
var PLACEHOLDER = '__lodash_placeholder__';
/* Built-in method references for those with the same name as other `lodash` methods. */

@@ -20,0 +20,0 @@ var nativeMin = Math.min;

@@ -18,4 +18,3 @@ import baseMerge from './_baseMerge';

if (isObject(objValue) && isObject(srcValue)) {
stack.set(srcValue, objValue);
baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);
baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue));
}

@@ -22,0 +21,0 @@ return objValue;

@@ -16,3 +16,3 @@ /** Used as the internal argument placeholder. */

length = array.length,
resIndex = -1,
resIndex = 0,
result = [];

@@ -24,3 +24,3 @@

array[index] = PLACEHOLDER;
result[++resIndex] = index;
result[resIndex++] = index;
}

@@ -27,0 +27,0 @@ }

@@ -30,2 +30,3 @@ import chunk from './chunk';

import pullAllBy from './pullAllBy';
import pullAllWith from './pullAllWith';
import pullAt from './pullAt';

@@ -71,10 +72,10 @@ import remove from './remove';

intersection, intersectionBy, intersectionWith, join, last,
lastIndexOf, pull, pullAll, pullAllBy, pullAt,
remove, reverse, slice, sortedIndex, sortedIndexBy,
sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, sortedUniq,
sortedUniqBy, tail, take, takeRight, takeRightWhile,
takeWhile, union, unionBy, unionWith, uniq,
uniqBy, uniqWith, unzip, unzipWith, without,
xor, xorBy, xorWith, zip, zipObject,
zipObjectDeep, zipWith
lastIndexOf, pull, pullAll, pullAllBy, pullAllWith,
pullAt, remove, reverse, slice, sortedIndex,
sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf,
sortedUniq, sortedUniqBy, tail, take, takeRight,
takeRightWhile, takeWhile, union, unionBy, unionWith,
uniq, uniqBy, uniqWith, unzip, unzipWith,
without, xor, xorBy, xorWith, zip,
zipObject, zipObjectDeep, zipWith
};

@@ -30,2 +30,3 @@ export { default as chunk } from './chunk';

export { default as pullAllBy } from './pullAllBy';
export { default as pullAllWith } from './pullAllWith';
export { default as pullAt } from './pullAt';

@@ -32,0 +33,0 @@ export { default as remove } from './remove';

@@ -0,5 +1,17 @@

import assignValue from './_assignValue';
import copyObject from './_copyObject';
import createAssigner from './_createAssigner';
import isArrayLike from './isArrayLike';
import isPrototype from './_isPrototype';
import keys from './keys';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
var nonEnumShadows = !({ 'valueOf': 1 }).propertyIsEnumerable('valueOf');
/**

@@ -36,5 +48,13 @@ * Assigns own enumerable properties of source objects to the destination

var assign = createAssigner(function(object, source) {
copyObject(source, keys(source), object);
if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
copyObject(source, keys(source), object);
return;
}
for (var key in source) {
if (hasOwnProperty.call(source, key)) {
assignValue(object, key, source[key]);
}
}
});
export default assign;

@@ -0,5 +1,11 @@

import assignValue from './_assignValue';
import copyObject from './_copyObject';
import createAssigner from './_createAssigner';
import isArrayLike from './isArrayLike';
import isPrototype from './_isPrototype';
import keysIn from './keysIn';
/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
var nonEnumShadows = !({ 'valueOf': 1 }).propertyIsEnumerable('valueOf');
/**

@@ -35,5 +41,11 @@ * This method is like `_.assign` except that it iterates over own and

var assignIn = createAssigner(function(object, source) {
copyObject(source, keysIn(source), object);
if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
copyObject(source, keysIn(source), object);
return;
}
for (var key in source) {
assignValue(object, key, source[key]);
}
});
export default assignIn;

@@ -35,7 +35,7 @@ import baseSlice from './_baseSlice';

var index = 0,
resIndex = -1,
resIndex = 0,
result = Array(nativeCeil(length / size));
while (index < length) {
result[++resIndex] = baseSlice(array, index, (index += size));
result[resIndex++] = baseSlice(array, index, (index += size));
}

@@ -42,0 +42,0 @@ return result;

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

length = array ? array.length : 0,
resIndex = -1,
resIndex = 0,
result = [];

@@ -25,3 +25,3 @@

if (value) {
result[++resIndex] = value;
result[resIndex++] = value;
}

@@ -28,0 +28,0 @@ }

@@ -9,3 +9,4 @@ import baseDifference from './_baseDifference';

* given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons.
* for equality comparisons. The order of result values is determined by the
* order they occur in the first array.
*

@@ -12,0 +13,0 @@ * @static

@@ -11,3 +11,4 @@ import baseDifference from './_baseDifference';

* is invoked for each element of `array` and `values` to generate the criterion
* by which uniqueness is computed. The iteratee is invoked with one argument: (value).
* by which they're compared. Result values are chosen from the first array.
* The iteratee is invoked with one argument: (value).
*

@@ -14,0 +15,0 @@ * @static

@@ -9,4 +9,5 @@ import baseDifference from './_baseDifference';

* This method is like `_.difference` except that it accepts `comparator`
* which is invoked to compare elements of `array` to `values`. The comparator
* is invoked with two arguments: (arrVal, othVal).
* which is invoked to compare elements of `array` to `values`. Result values
* are chosen from the first array. The comparator is invoked with two arguments:
* (arrVal, othVal).
*

@@ -13,0 +14,0 @@ * @static

@@ -9,3 +9,4 @@ import arrayMap from './_arrayMap';

* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons.
* for equality comparisons. The order of result values is determined by the
* order they occur in the first array.
*

@@ -16,3 +17,3 @@ * @static

* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of shared values.
* @returns {Array} Returns the new array of intersecting values.
* @example

@@ -19,0 +20,0 @@ *

@@ -11,3 +11,4 @@ import arrayMap from './_arrayMap';

* which is invoked for each element of each `arrays` to generate the criterion
* by which uniqueness is computed. The iteratee is invoked with one argument: (value).
* by which they're compared. Result values are chosen from the first array.
* The iteratee is invoked with one argument: (value).
*

@@ -19,3 +20,3 @@ * @static

* @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new array of shared values.
* @returns {Array} Returns the new array of intersecting values.
* @example

@@ -22,0 +23,0 @@ *

@@ -9,4 +9,5 @@ import arrayMap from './_arrayMap';

* This method is like `_.intersection` except that it accepts `comparator`
* which is invoked to compare elements of `arrays`. The comparator is invoked
* with two arguments: (arrVal, othVal).
* which is invoked to compare elements of `arrays`. Result values are chosen
* from the first array. The comparator is invoked with two arguments:
* (arrVal, othVal).
*

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

* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of shared values.
* @returns {Array} Returns the new array of intersecting values.
* @example

@@ -21,0 +22,0 @@ *

@@ -30,6 +30,5 @@ import getLength from './_getLength';

function isArrayLike(value) {
return value != null &&
!(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
return value != null && isLength(getLength(value)) && !isFunction(value);
}
export default isArrayLike;

@@ -14,5 +14,5 @@ import isArguments from './isArguments';

/**
* Checks if `value` is empty. A value is considered empty unless it's an
* `arguments` object, array, string, or jQuery-like collection with a length
* greater than `0` or an object with own enumerable properties.
* Checks if `value` is an empty collection or object. A value is considered
* empty if it's an `arguments` object, array, string, or jQuery-like collection
* with a length of `0` or has no own enumerable properties.
*

@@ -22,3 +22,3 @@ * @static

* @category Lang
* @param {Array|Object|string} value The value to inspect.
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is empty, else `false`.

@@ -25,0 +25,0 @@ * @example

@@ -34,4 +34,4 @@ import isObject from './isObject';

// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array constructors, and
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
// in Safari 8 which returns 'object' for typed array and weak map constructors,
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : '';

@@ -38,0 +38,0 @@ return tag == funcTag || tag == genTag;

/**
* @license
* lodash 4.5.1 (Custom Build) <https://lodash.com/>
* lodash 4.6.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`

@@ -47,3 +47,3 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>

/** Used as the semantic version number. */
var VERSION = '4.5.1';
var VERSION = '4.6.0';

@@ -183,2 +183,3 @@ /** Used to compose bitmasks for wrapper metadata. */

lodash.pullAllBy = array.pullAllBy;
lodash.pullAllWith = array.pullAllWith;
lodash.pullAt = array.pullAt;

@@ -226,2 +227,4 @@ lodash.range = util.range;

lodash.unzipWith = array.unzipWith;
lodash.update = object.update;
lodash.updateWith = object.updateWith;
lodash.values = object.values;

@@ -228,0 +231,0 @@ lodash.valuesIn = object.valuesIn;

/**
* @license
* lodash 4.5.1 (Custom Build) <https://lodash.com/>
* lodash 4.6.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`

@@ -204,2 +204,3 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>

export { default as pullAllBy } from './pullAllBy';
export { default as pullAllWith } from './pullAllWith';
export { default as pullAt } from './pullAt';

@@ -287,2 +288,4 @@ export { default as random } from './random';

export { default as unzipWith } from './unzipWith';
export { default as update } from './update';
export { default as updateWith } from './updateWith';
export { default as upperCase } from './upperCase';

@@ -289,0 +292,0 @@ export { default as upperFirst } from './upperFirst';

@@ -5,8 +5,9 @@ import baseMerge from './_baseMerge';

/**
* Recursively merges own and inherited enumerable properties of source objects
* into the destination object. Source properties that resolve to `undefined`
* are skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable properties of source objects into the destination
* object. Source properties that resolve to `undefined` are skipped if a
* destination value exists. Array and plain object properties are merged
* recursively.Other objects and value types are overridden by assignment.
* Source objects are applied from left to right. Subsequent sources
* overwrite property assignments of previous sources.
*

@@ -13,0 +14,0 @@ * **Note:** This method mutates `object`.

@@ -41,2 +41,4 @@ import assign from './assign';

import unset from './unset';
import update from './update';
import updateWith from './updateWith';
import values from './values';

@@ -54,3 +56,3 @@ import valuesIn from './valuesIn';

setWith, toPairs, toPairsIn, transform, unset,
values, valuesIn
update, updateWith, values, valuesIn
};

@@ -41,4 +41,6 @@ export { default as assign } from './assign';

export { default as unset } from './unset';
export { default as update } from './update';
export { default as updateWith } from './updateWith';
export { default as values } from './values';
export { default as valuesIn } from './valuesIn';
export { default as default } from './object.default';
{
"name": "lodash-es",
"version": "4.5.1",
"version": "4.6.0",
"description": "Lodash exported as ES modules.",

@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/custom-builds",

import baseIteratee from './_baseIteratee';
import basePullAllBy from './_basePullAllBy';
import basePullAll from './_basePullAll';

@@ -7,3 +7,3 @@ /**

* invoked for each element of `array` and `values` to generate the criterion
* by which uniqueness is computed. The iteratee is invoked with one argument: (value).
* by which they're compared. The iteratee is invoked with one argument: (value).
*

@@ -29,3 +29,3 @@ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.

return (array && array.length && values && values.length)
? basePullAllBy(array, values, baseIteratee(iteratee))
? basePullAll(array, values, baseIteratee(iteratee))
: array;

@@ -32,0 +32,0 @@ }

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

# lodash-es v4.5.1
# lodash-es v4.6.0

@@ -10,2 +10,2 @@ The [lodash](https://lodash.com/) library exported as [ES](http://www.ecma-international.org/ecma-262/6.0/) modules.

See the [package source](https://github.com/lodash/lodash/tree/4.5.1-es) for more details.
See the [package source](https://github.com/lodash/lodash/tree/4.6.0-es) for more details.

@@ -21,4 +21,6 @@ import baseSet from './_baseSet';

*
* _.setWith({ '0': { 'length': 2 } }, '[0][1][2]', 3, Object);
* // => { '0': { '1': { '2': 3 }, 'length': 2 } }
* var object = {};
*
* _.setWith(object, '[0][1]', 'a', Object);
* // => { '0': { '1': 'a' } }
*/

@@ -25,0 +27,0 @@ function setWith(object, path, value, customizer) {

import toString from './toString';
/**
* Converts `string`, as a whole, to lower case.
* Converts `string`, as a whole, to lower case just like
* [String#toLowerCase](https://mdn.io/toLowerCase).
*

@@ -6,0 +7,0 @@ * @static

@@ -9,3 +9,3 @@ import Symbol from './_Symbol';

var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolToString = Symbol ? symbolProto.toString : undefined;
symbolToString = symbolProto ? symbolProto.toString : undefined;

@@ -41,3 +41,3 @@ /**

if (isSymbol(value)) {
return Symbol ? symbolToString.call(value) : '';
return symbolToString ? symbolToString.call(value) : '';
}

@@ -44,0 +44,0 @@ var result = (value + '');

import toString from './toString';
/**
* Converts `string`, as a whole, to upper case.
* Converts `string`, as a whole, to upper case just like
* [String#toUpperCase](https://mdn.io/toUpperCase).
*

@@ -6,0 +7,0 @@ * @static

@@ -56,42 +56,44 @@ import LazyWrapper from './_LazyWrapper';

* `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
* `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, `difference`,
* `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`,
* `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flattenDepth`,
* `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, `functionsIn`,
* `groupBy`, `initial`, `intersection`, `intersectionBy`, `intersectionWith`,
* `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`,
* `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, `memoize`,
* `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, `nthArg`,
* `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, `overEvery`,
* `overSome`, `partial`, `partialRight`, `partition`, `pick`, `pickBy`, `plant`,
* `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`,
* `range`, `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`,
* `sampleSize`, `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`,
* `splice`, `spread`, `tail`, `take`, `takeRight`, `takeRightWhile`,
* `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, `toPairs`, `toPairsIn`,
* `toPath`, `toPlainObject`, `transform`, `unary`, `union`, `unionBy`,
* `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, `unshift`, `unzip`,
* `unzipWith`, `values`, `valuesIn`, `without`, `wrap`, `xor`, `xorBy`,
* `xorWith`, `zip`, `zipObject`, `zipObjectDeep`, and `zipWith`
* `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
* `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
* `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
* `flatten`, `flattenDeep`, `flattenDepth`, `flip`, `flow`, `flowRight`,
* `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`, `intersection`,
* `intersectionBy`, `intersectionWith`, `invert`, `invertBy`, `invokeMap`,
* `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`,
* `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`,
* `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, `orderBy`,
* `over`, `overArgs`, `overEvery`, `overSome`, `partial`, `partialRight`,
* `partition`, `pick`, `pickBy`, `plant`, `property`, `propertyOf`, `pull`,
* `pullAll`, `pullAllBy`, `pullAllWith`, `pullAt`, `push`, `range`,
* `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, `sampleSize`,
* `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`,
* `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`,
* `thru`, `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`,
* `transform`, `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`,
* `uniqWith`, `unset`, `unshift`, `unzip`, `unzipWith`, `update`, `values`,
* `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`,
* `zipObjectDeep`, and `zipWith`
*
* The wrapper methods that are **not** chainable by default are:
* `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
* `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`,
* `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
* `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, `forIn`,
* `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`,
* `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`,
* `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
* `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
* `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
* `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
* `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
* `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
* `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
* `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`,
* `now`, `pad`, `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`,
* `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `sample`,
* `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`,
* `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`,
* `sum`, `sumBy`, `template`, `times`, `toLower`, `toInteger`, `toLength`,
* `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `each`, `eachRight`,
* `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`,
* `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, `floor`,
* `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,
* `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, `includes`,
* `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, `isArrayBuffer`,
* `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, `isDate`,
* `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, `isFinite`,
* `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, `isMatchWith`,
* `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`,
* `isPlainObject`, `isRegExp`, `isSafeInteger`, `isSet`, `isString`,
* `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, `join`, `kebabCase`,
* `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`,
* `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`, `now`, `pad`,
* `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
* `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
* `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
* `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`, `sum`, `sumBy`,
* `template`, `times`, `toInteger`, `toJSON`, `toLength`, `toLower`,
* `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, `trimEnd`,

@@ -141,3 +143,4 @@ * `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, `upperFirst`,

lodash.prototype = baseLodash.prototype;
lodash.prototype.constructor = lodash;
export default lodash;

@@ -8,3 +8,4 @@ import arrayFilter from './_arrayFilter';

* Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
* of the given arrays.
* of the given arrays. The order of result values is determined by the order
* they occur in the arrays.
*

@@ -11,0 +12,0 @@ * @static

@@ -11,3 +11,3 @@ import arrayFilter from './_arrayFilter';

* invoked for each element of each `arrays` to generate the criterion by which
* uniqueness is computed. The iteratee is invoked with one argument: (value).
* by which they're compared. The iteratee is invoked with one argument: (value).
*

@@ -14,0 +14,0 @@ * @static

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