lodash.union
Advanced tools
Comparing version 4.5.0 to 4.6.0
65
index.js
@@ -27,3 +27,3 @@ /** | ||
* Used to match `RegExp` | ||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). | ||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). | ||
*/ | ||
@@ -69,3 +69,3 @@ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; | ||
* @private | ||
* @param {Array} [array] The array to search. | ||
* @param {Array} [array] The array to inspect. | ||
* @param {*} target The value to search for. | ||
@@ -83,3 +83,3 @@ * @returns {boolean} Returns `true` if `target` is found, else `false`. | ||
* @private | ||
* @param {Array} [array] The array to search. | ||
* @param {Array} [array] The array to inspect. | ||
* @param {*} target The value to search for. | ||
@@ -125,3 +125,3 @@ * @param {Function} comparator The comparator invoked per element. | ||
* @private | ||
* @param {Array} array The array to search. | ||
* @param {Array} array The array to inspect. | ||
* @param {Function} predicate The function invoked per iteration. | ||
@@ -148,3 +148,3 @@ * @param {number} fromIndex The index to search from. | ||
* @private | ||
* @param {Array} array The array to search. | ||
* @param {Array} array The array to inspect. | ||
* @param {*} value The value to search for. | ||
@@ -181,15 +181,2 @@ * @param {number} fromIndex The index to search from. | ||
/** | ||
* The base implementation of `_.property` without support for deep paths. | ||
* | ||
* @private | ||
* @param {string} key The key of the property to get. | ||
* @returns {Function} Returns the new accessor function. | ||
*/ | ||
function baseProperty(key) { | ||
return function(object) { | ||
return object == null ? undefined : object[key]; | ||
}; | ||
} | ||
/** | ||
* Checks if a cache value for `key` exists. | ||
@@ -256,2 +243,3 @@ * | ||
var arrayProto = Array.prototype, | ||
funcProto = Function.prototype, | ||
objectProto = Object.prototype; | ||
@@ -269,3 +257,3 @@ | ||
/** Used to resolve the decompiled source of functions. */ | ||
var funcToString = Function.prototype.toString; | ||
var funcToString = funcProto.toString; | ||
@@ -277,3 +265,3 @@ /** Used to check objects for own properties. */ | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -661,3 +649,3 @@ */ | ||
* @private | ||
* @param {Array} array The array to search. | ||
* @param {Array} array The array to inspect. | ||
* @param {*} key The key to search for. | ||
@@ -828,15 +816,2 @@ * @returns {number} Returns the index of the matched value, else `-1`. | ||
/** | ||
* Gets the "length" property value of `object`. | ||
* | ||
* **Note:** This function is used to avoid a | ||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects | ||
* Safari on at least iOS 8.1-8.3 ARM64. | ||
* | ||
* @private | ||
* @param {Object} object The object to query. | ||
* @returns {*} Returns the "length" value. | ||
*/ | ||
var getLength = baseProperty('length'); | ||
/** | ||
* Gets the data for `map`. | ||
@@ -878,3 +853,3 @@ * | ||
return isArray(value) || isArguments(value) || | ||
!!(spreadableSymbol && value && value[spreadableSymbol]) | ||
!!(spreadableSymbol && value && value[spreadableSymbol]); | ||
} | ||
@@ -928,3 +903,3 @@ | ||
* Creates an array of unique values, in order, from all given arrays using | ||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) | ||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) | ||
* for equality comparisons. | ||
@@ -949,3 +924,3 @@ * | ||
* Performs a | ||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) | ||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) | ||
* comparison between two values to determine if they are equivalent. | ||
@@ -1003,3 +978,3 @@ * | ||
function isArguments(value) { | ||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. | ||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode. | ||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && | ||
@@ -1060,3 +1035,3 @@ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); | ||
function isArrayLike(value) { | ||
return value != null && isLength(getLength(value)) && !isFunction(value); | ||
return value != null && isLength(value.length) && !isFunction(value); | ||
} | ||
@@ -1112,4 +1087,3 @@ | ||
// The use of `Object#toString` avoids issues with the `typeof` operator | ||
// in Safari 8 which returns 'object' for typed array and weak map constructors, | ||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances. | ||
// in Safari 8-9 which returns 'object' for typed array and other constructors. | ||
var tag = isObject(value) ? objectToString.call(value) : ''; | ||
@@ -1122,4 +1096,4 @@ return tag == funcTag || tag == genTag; | ||
* | ||
* **Note:** This function is loosely based on | ||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). | ||
* **Note:** This method is loosely based on | ||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). | ||
* | ||
@@ -1131,4 +1105,3 @@ * @static | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is a valid length, | ||
* else `false`. | ||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`. | ||
* @example | ||
@@ -1155,3 +1128,3 @@ * | ||
* Checks if `value` is the | ||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) | ||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) | ||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
@@ -1158,0 +1131,0 @@ * |
{ | ||
"name": "lodash.union", | ||
"version": "4.5.0", | ||
"version": "4.6.0", | ||
"description": "The lodash method `_.union` exported as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash.union v4.5.0 | ||
# lodash.union v4.6.0 | ||
@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.union` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [documentation](https://lodash.com/docs#union) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.union) for more details. | ||
See the [documentation](https://lodash.com/docs#union) or [package source](https://github.com/lodash/lodash/blob/4.6.0-npm-packages/lodash.union) for more details. |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
32457
1085