diff --git a/README.md b/README.md
index 31a57a567..bc87a77fc 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# lodash v4.5.1
+# lodash v4.5.2
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
diff --git a/lodash._baseclone/README.md b/lodash._baseclone/README.md
index 043b654f5..1a8a00c31 100644
--- a/lodash._baseclone/README.md
+++ b/lodash._baseclone/README.md
@@ -1,4 +1,4 @@
-# lodash._baseclone v4.5.1
+# lodash._baseclone v4.5.2
The internal [lodash](https://lodash.com/) function `baseClone` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var baseClone = require('lodash._baseclone');
```
-See the [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash._baseclone) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash._baseclone) for more details.
diff --git a/lodash._baseclone/index.js b/lodash._baseclone/index.js
index 9fa1ee8d2..7b79d910f 100644
--- a/lodash._baseclone/index.js
+++ b/lodash._baseclone/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.5.1 (Custom Build)
+ * lodash 4.5.2 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -124,6 +124,7 @@ var root = freeGlobal ||
* @returns {Object} Returns `map`.
*/
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]);
return map;
}
@@ -331,7 +332,7 @@ var mapCtorString = Map ? funcToString.call(Map) : '',
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
* Creates an hash object.
@@ -878,9 +879,7 @@ function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
- var Ctor = buffer.constructor,
- result = new Ctor(buffer.length);
-
+ var result = new buffer.constructor(buffer.length);
buffer.copy(result);
return result;
}
@@ -893,11 +892,8 @@ function cloneBuffer(buffer, isDeep) {
* @returns {ArrayBuffer} Returns the cloned array buffer.
*/
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;
}
@@ -909,8 +905,7 @@ function cloneArrayBuffer(arrayBuffer) {
* @returns {Object} Returns the cloned map.
*/
function cloneMap(map) {
- var Ctor = map.constructor;
- return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
+ return arrayReduce(mapToArray(map), addMapEntry, new map.constructor);
}
/**
@@ -921,9 +916,7 @@ function cloneMap(map) {
* @returns {Object} Returns the cloned regexp.
*/
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;
return result;
}
@@ -936,8 +929,7 @@ function cloneRegExp(regexp) {
* @returns {Object} Returns the cloned set.
*/
function cloneSet(set) {
- var Ctor = set.constructor;
- return arrayReduce(setToArray(set), addSetEntry, new Ctor);
+ return arrayReduce(setToArray(set), addSetEntry, new set.constructor);
}
/**
@@ -948,7 +940,7 @@ function cloneSet(set) {
* @returns {Object} Returns the cloned symbol object.
*/
function cloneSymbol(symbol) {
- return Symbol ? Object(symbolValueOf.call(symbol)) : {};
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
/**
@@ -960,11 +952,8 @@ function cloneSymbol(symbol) {
* @returns {Object} Returns the cloned typed array.
*/
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);
}
/**
@@ -1085,7 +1074,7 @@ var getLength = baseProperty('length');
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
- var value = object == null ? undefined : object[key];
+ var value = object[key];
return isNative(value) ? value : undefined;
}
@@ -1158,7 +1147,7 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
- return (isFunction(object.constructor) && !isPrototype(object))
+ return (typeof object.constructor == 'function' && !isPrototype(object))
? baseCreate(getPrototypeOf(object))
: {};
}
@@ -1247,7 +1236,7 @@ function isKeyable(value) {
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
- proto = (isFunction(Ctor) && Ctor.prototype) || objectProto;
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto;
}
@@ -1358,8 +1347,7 @@ var isArray = Array.isArray;
* // => false
*/
function isArrayLike(value) {
- return value != null &&
- !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
+ return value != null && isLength(getLength(value)) && !isFunction(value);
}
/**
@@ -1427,8 +1415,8 @@ var isBuffer = !Buffer ? constant(false) : function(value) {
*/
function isFunction(value) {
// 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) : '';
return tag == funcTag || tag == genTag;
}
diff --git a/lodash._baseclone/package.json b/lodash._baseclone/package.json
index c28f04558..da4cf15cd 100644
--- a/lodash._baseclone/package.json
+++ b/lodash._baseclone/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._baseclone",
- "version": "4.5.1",
+ "version": "4.5.2",
"description": "The internal lodash function `baseClone` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -8,7 +8,7 @@
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Blaine Bublitz (https://github.com/phated)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
diff --git a/lodash._baseiteratee/README.md b/lodash._baseiteratee/README.md
index 28add9b99..0d85fe457 100644
--- a/lodash._baseiteratee/README.md
+++ b/lodash._baseiteratee/README.md
@@ -1,4 +1,4 @@
-# lodash._baseiteratee v4.5.1
+# lodash._baseiteratee v4.5.2
The internal [lodash](https://lodash.com/) function `baseIteratee` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var baseIteratee = require('lodash._baseiteratee');
```
-See the [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash._baseiteratee) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash._baseiteratee) for more details.
diff --git a/lodash._baseiteratee/index.js b/lodash._baseiteratee/index.js
index 66a0fba89..8af4f0f78 100644
--- a/lodash._baseiteratee/index.js
+++ b/lodash._baseiteratee/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.5.1 (Custom Build)
+ * lodash 4.5.2 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation
* Based on Underscore.js 1.8.3
@@ -7,16 +7,16 @@
* Available under MIT license
*/
-/** Used to compose bitmasks for comparison styles. */
-var UNORDERED_COMPARE_FLAG = 1,
- PARTIAL_COMPARE_FLAG = 2;
-
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
+/** Used to compose bitmasks for comparison styles. */
+var UNORDERED_COMPARE_FLAG = 1,
+ PARTIAL_COMPARE_FLAG = 2;
+
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
MAX_SAFE_INTEGER = 9007199254740991;
@@ -317,8 +317,8 @@ var mapCtorString = Map ? funcToString.call(Map) : '',
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolValueOf = Symbol ? symbolProto.valueOf : undefined,
- symbolToString = Symbol ? symbolProto.toString : undefined;
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
/**
* Creates an hash object.
@@ -782,33 +782,28 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
if (!objIsArr) {
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;
}
var objIsObj = objTag == objectTag && !isHostObject(object),
othIsObj = othTag == objectTag && !isHostObject(other),
isSameTag = objTag == othTag;
- 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__'),
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);
}
}
@@ -816,7 +811,7 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
return false;
}
stack || (stack = new Stack);
- return (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack);
+ return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
}
/**
@@ -1014,9 +1009,9 @@ function baseSlice(array, start, end) {
* @param {Array} array The array to compare.
* @param {Array} other The other array to compare.
* @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`.
*/
function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
@@ -1083,11 +1078,12 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
* @param {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare.
* @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) {
case arrayBufferTag:
if ((object.byteLength != other.byteLength) ||
@@ -1122,12 +1118,21 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {
var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
convert || (convert = setToArray);
+ 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);
+ }
}
return false;
}
@@ -1140,9 +1145,9 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @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`.
*/
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
@@ -1245,7 +1250,7 @@ function getMatchData(object) {
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
- var value = object == null ? undefined : object[key];
+ var value = object[key];
return isNative(value) ? value : undefined;
}
@@ -1365,7 +1370,7 @@ function isKeyable(value) {
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
- proto = (isFunction(Ctor) && Ctor.prototype) || objectProto;
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto;
}
@@ -1533,8 +1538,7 @@ var isArray = Array.isArray;
* // => false
*/
function isArrayLike(value) {
- return value != null &&
- !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
+ return value != null && isLength(getLength(value)) && !isFunction(value);
}
/**
@@ -1582,8 +1586,8 @@ function isArrayLikeObject(value) {
*/
function isFunction(value) {
// 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) : '';
return tag == funcTag || tag == genTag;
}
@@ -1791,7 +1795,7 @@ function toString(value) {
return '';
}
if (isSymbol(value)) {
- return Symbol ? symbolToString.call(value) : '';
+ return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
diff --git a/lodash._baseiteratee/package.json b/lodash._baseiteratee/package.json
index 2fb71034f..f7c2489de 100644
--- a/lodash._baseiteratee/package.json
+++ b/lodash._baseiteratee/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash._baseiteratee",
- "version": "4.5.1",
+ "version": "4.5.2",
"description": "The internal lodash function `baseIteratee` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -8,7 +8,7 @@
"author": "John-David Dalton (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton (http://allyoucanleet.com/)",
- "Blaine Bublitz (https://github.com/phated)",
+ "Blaine Bublitz (https://github.com/phated)",
"Mathias Bynens (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
diff --git a/lodash.cond/README.md b/lodash.cond/README.md
index aa1aa00a3..3e558f78b 100644
--- a/lodash.cond/README.md
+++ b/lodash.cond/README.md
@@ -1,4 +1,4 @@
-# lodash.cond v4.5.1
+# lodash.cond v4.5.2
The [lodash](https://lodash.com/) method `_.cond` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var cond = require('lodash.cond');
```
-See the [documentation](https://lodash.com/docs#cond) or [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash.cond) for more details.
+See the [documentation](https://lodash.com/docs#cond) or [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash.cond) for more details.
diff --git a/lodash.cond/index.js b/lodash.cond/index.js
index 5d4b860de..ce1f37a0b 100644
--- a/lodash.cond/index.js
+++ b/lodash.cond/index.js
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/**
* 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).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -278,7 +278,7 @@ function mapToArray(map) {
}
/**
- * Creates a function that invokes `func` with its first argument transformed.
+ * Creates a unary function that invokes `func` with its argument transformed.
*
* @private
* @param {Function} func The function to wrap.
@@ -310,6 +310,7 @@ function setToArray(set) {
/** Used for built-in method references. */
var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
@@ -322,14 +323,14 @@ var maskSrcKey = (function() {
}());
/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
+var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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.
*/
var objectToString = objectProto.toString;
@@ -347,8 +348,7 @@ var Symbol = root.Symbol,
splice = arrayProto.splice;
/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeGetPrototype = Object.getPrototypeOf,
- nativeKeys = Object.keys,
+var nativeKeys = overArg(Object.keys, Object),
nativeMax = Math.max;
/* Built-in method references that are verified to be native. */
@@ -817,11 +817,38 @@ Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
+/**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+function arrayLikeKeys(value, inherited) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
+ var result = (isArray(value) || isArguments(value))
+ ? baseTimes(value.length, String)
+ : [];
+
+ var length = result.length,
+ skipIndexes = !!length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
- * @param {Array} array The array to search.
+ * @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
@@ -866,23 +893,6 @@ function baseGetTag(value) {
return objectToString.call(value);
}
-/**
- * The base implementation of `_.has` without support for deep paths.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {Array|string} key The key to check.
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
- */
-function baseHas(object, key) {
- // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
- // that are composed entirely of index properties, return `false` for
- // `hasOwnProperty` checks of them.
- return object != null &&
- (hasOwnProperty.call(object, key) ||
- (typeof object == 'object' && key in object && getPrototype(object) === null));
-}
-
/**
* The base implementation of `_.hasIn` without support for deep paths.
*
@@ -1085,14 +1095,24 @@ function baseIteratee(value) {
}
/**
- * The base implementation of `_.keys` which doesn't skip the constructor
- * property of prototypes or treat sparse arrays as dense.
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
-var baseKeys = overArg(nativeKeys, Object);
+function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+}
/**
* The base implementation of `_.matches` which doesn't clone `source`.
@@ -1327,7 +1347,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
case regexpTag:
case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects,
- // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
// for more details.
return object == (other + '');
@@ -1389,7 +1409,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
var index = objLength;
while (index--) {
var key = objProps[index];
- if (!(isPartial ? key in other : baseHas(other, key))) {
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
@@ -1440,19 +1460,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
return result;
}
-/**
- * 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`.
*
@@ -1501,15 +1508,6 @@ function getNative(object, key) {
return baseIsNative(value) ? value : undefined;
}
-/**
- * Gets the `[[Prototype]]` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {null|Object} Returns the `[[Prototype]]`.
- */
-var getPrototype = overArg(nativeGetPrototype, Object);
-
/**
* Gets the `toStringTag` of `value`.
*
@@ -1520,7 +1518,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
var getTag = baseGetTag;
// Fallback for data views, maps, sets, and weak maps in IE 11,
-// for data views in Edge, and promises in Node.js.
+// for data views in Edge < 14, and promises in Node.js.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
@@ -1572,24 +1570,7 @@ function hasPath(object, path, hasFunc) {
}
var length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) &&
- (isArray(object) || isString(object) || isArguments(object));
-}
-
-/**
- * Creates an array of index keys for `object` values of arrays,
- * `arguments` objects, and strings, otherwise `null` is returned.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array|null} Returns index keys, else `null`.
- */
-function indexKeys(object) {
- var length = object ? object.length : undefined;
- if (isLength(length) &&
- (isArray(object) || isString(object) || isArguments(object))) {
- return baseTimes(length, String);
- }
- return null;
+ (isArray(object) || isArguments(object));
}
/**
@@ -1762,7 +1743,7 @@ function toSource(func) {
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `delete`, `get`, `has`, and `set`.
*
* @static
@@ -1821,7 +1802,7 @@ memoize.Cache = MapCache;
/**
* 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.
*
* @static
@@ -1874,7 +1855,7 @@ function eq(value, other) {
* // => false
*/
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') &&
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
}
@@ -1930,7 +1911,7 @@ var isArray = Array.isArray;
* // => false
*/
function isArrayLike(value) {
- return value != null && isLength(getLength(value)) && !isFunction(value);
+ return value != null && isLength(value.length) && !isFunction(value);
}
/**
@@ -1981,8 +1962,7 @@ function isArrayLikeObject(value) {
*/
function isFunction(value) {
// 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) : '';
return tag == funcTag || tag == genTag;
}
@@ -1990,16 +1970,15 @@ function isFunction(value) {
/**
* Checks if `value` is a valid array-like length.
*
- * **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).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @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
*
* _.isLength(3);
@@ -2021,7 +2000,7 @@ function isLength(value) {
/**
* 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('')`)
*
* @static
@@ -2077,28 +2056,6 @@ function isObjectLike(value) {
return !!value && typeof value == 'object';
}
-/**
- * Checks if `value` is classified as a `String` primitive or object.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a string, else `false`.
- * @example
- *
- * _.isString('abc');
- * // => true
- *
- * _.isString(1);
- * // => false
- */
-function isString(value) {
- return typeof value == 'string' ||
- (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
-}
-
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
@@ -2229,7 +2186,7 @@ function hasIn(object, path) {
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* for more details.
*
* @static
@@ -2254,23 +2211,7 @@ function hasIn(object, path) {
* // => ['0', '1']
*/
function keys(object) {
- var isProto = isPrototype(object);
- if (!(isProto || isArrayLike(object))) {
- return baseKeys(object);
- }
- var indexes = indexKeys(object),
- skipIndexes = !!indexes,
- result = indexes || [],
- length = result.length;
-
- for (var key in object) {
- if (baseHas(object, key) &&
- !(skipIndexes && (key == 'length' || isIndex(key, length))) &&
- !(isProto && key == 'constructor')) {
- result.push(key);
- }
- }
- return result;
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
/**
diff --git a/lodash.cond/package.json b/lodash.cond/package.json
index 0b4cb4bff..d21c8e101 100644
--- a/lodash.cond/package.json
+++ b/lodash.cond/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.cond",
- "version": "4.5.1",
+ "version": "4.5.2",
"description": "The lodash method `_.cond` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.has/README.md b/lodash.has/README.md
index 3534c168e..308727b3d 100644
--- a/lodash.has/README.md
+++ b/lodash.has/README.md
@@ -1,4 +1,4 @@
-# lodash.has v4.5.1
+# lodash.has v4.5.2
The [lodash](https://lodash.com/) method `_.has` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var has = require('lodash.has');
```
-See the [documentation](https://lodash.com/docs#has) or [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash.has) for more details.
+See the [documentation](https://lodash.com/docs#has) or [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash.has) for more details.
diff --git a/lodash.has/index.js b/lodash.has/index.js
index 88f981b35..cb3597329 100644
--- a/lodash.has/index.js
+++ b/lodash.has/index.js
@@ -21,7 +21,6 @@ var INFINITY = 1 / 0,
var argsTag = '[object Arguments]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
- stringTag = '[object String]',
symbolTag = '[object Symbol]';
/** Used to match property names within property paths. */
@@ -32,7 +31,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/**
* 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).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -54,19 +53,6 @@ var freeSelf = typeof self == 'object' && self && self.Object === Object && self
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
-/**
- * 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];
- };
-}
-
/**
* Gets the value at `key` of `object`.
*
@@ -98,22 +84,9 @@ function isHostObject(value) {
return result;
}
-/**
- * Creates a function that invokes `func` with its first argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
-function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
-}
-
/** Used for built-in method references. */
var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
@@ -126,14 +99,14 @@ var maskSrcKey = (function() {
}());
/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
+var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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.
*/
var objectToString = objectProto.toString;
@@ -149,9 +122,6 @@ var Symbol = root.Symbol,
propertyIsEnumerable = objectProto.propertyIsEnumerable,
splice = arrayProto.splice;
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeGetPrototype = Object.getPrototypeOf;
-
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map'),
nativeCreate = getNative(Object, 'create');
@@ -468,7 +438,7 @@ MapCache.prototype.set = mapCacheSet;
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
- * @param {Array} array The array to search.
+ * @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
@@ -491,12 +461,7 @@ function assocIndexOf(array, key) {
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHas(object, key) {
- // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
- // that are composed entirely of index properties, return `false` for
- // `hasOwnProperty` checks of them.
- return object != null &&
- (hasOwnProperty.call(object, key) ||
- (typeof object == 'object' && key in object && getPrototype(object) === null));
+ return object != null && hasOwnProperty.call(object, key);
}
/**
@@ -546,19 +511,6 @@ function castPath(value) {
return isArray(value) ? value : stringToPath(value);
}
-/**
- * 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`.
*
@@ -587,15 +539,6 @@ function getNative(object, key) {
return baseIsNative(value) ? value : undefined;
}
-/**
- * Gets the `[[Prototype]]` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {null|Object} Returns the `[[Prototype]]`.
- */
-var getPrototype = overArg(nativeGetPrototype, Object);
-
/**
* Checks if `path` exists on `object`.
*
@@ -624,7 +567,7 @@ function hasPath(object, path, hasFunc) {
}
var length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) &&
- (isArray(object) || isString(object) || isArguments(object));
+ (isArray(object) || isArguments(object));
}
/**
@@ -752,7 +695,7 @@ function toSource(func) {
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `delete`, `get`, `has`, and `set`.
*
* @static
@@ -811,7 +754,7 @@ memoize.Cache = MapCache;
/**
* 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.
*
* @static
@@ -864,7 +807,7 @@ function eq(value, other) {
* // => false
*/
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') &&
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
}
@@ -920,7 +863,7 @@ var isArray = Array.isArray;
* // => false
*/
function isArrayLike(value) {
- return value != null && isLength(getLength(value)) && !isFunction(value);
+ return value != null && isLength(value.length) && !isFunction(value);
}
/**
@@ -971,8 +914,7 @@ function isArrayLikeObject(value) {
*/
function isFunction(value) {
// 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) : '';
return tag == funcTag || tag == genTag;
}
@@ -980,16 +922,15 @@ function isFunction(value) {
/**
* Checks if `value` is a valid array-like length.
*
- * **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).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @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
*
* _.isLength(3);
@@ -1011,7 +952,7 @@ function isLength(value) {
/**
* 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('')`)
*
* @static
@@ -1067,28 +1008,6 @@ function isObjectLike(value) {
return !!value && typeof value == 'object';
}
-/**
- * Checks if `value` is classified as a `String` primitive or object.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a string, else `false`.
- * @example
- *
- * _.isString('abc');
- * // => true
- *
- * _.isString(1);
- * // => false
- */
-function isString(value) {
- return typeof value == 'string' ||
- (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
-}
-
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
diff --git a/lodash.has/package.json b/lodash.has/package.json
index c5933c60b..c6a38f306 100644
--- a/lodash.has/package.json
+++ b/lodash.has/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.has",
- "version": "4.5.1",
+ "version": "4.5.2",
"description": "The lodash method `_.has` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.hasin/README.md b/lodash.hasin/README.md
index 903d488bd..ec6cc4899 100644
--- a/lodash.hasin/README.md
+++ b/lodash.hasin/README.md
@@ -1,4 +1,4 @@
-# lodash.hasin v4.5.1
+# lodash.hasin v4.5.2
The [lodash](https://lodash.com/) method `_.hasIn` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var hasIn = require('lodash.hasin');
```
-See the [documentation](https://lodash.com/docs#hasIn) or [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash.hasin) for more details.
+See the [documentation](https://lodash.com/docs#hasIn) or [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash.hasin) for more details.
diff --git a/lodash.hasin/index.js b/lodash.hasin/index.js
index e41f29604..bcaefd2d3 100644
--- a/lodash.hasin/index.js
+++ b/lodash.hasin/index.js
@@ -21,7 +21,6 @@ var INFINITY = 1 / 0,
var argsTag = '[object Arguments]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
- stringTag = '[object String]',
symbolTag = '[object Symbol]';
/** Used to match property names within property paths. */
@@ -32,7 +31,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/**
* 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).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -54,19 +53,6 @@ var freeSelf = typeof self == 'object' && self && self.Object === Object && self
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
-/**
- * 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];
- };
-}
-
/**
* Gets the value at `key` of `object`.
*
@@ -100,6 +86,7 @@ function isHostObject(value) {
/** Used for built-in method references. */
var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
@@ -112,14 +99,14 @@ var maskSrcKey = (function() {
}());
/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
+var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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.
*/
var objectToString = objectProto.toString;
@@ -451,7 +438,7 @@ MapCache.prototype.set = mapCacheSet;
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
- * @param {Array} array The array to search.
+ * @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
@@ -524,19 +511,6 @@ function castPath(value) {
return isArray(value) ? value : stringToPath(value);
}
-/**
- * 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`.
*
@@ -593,7 +567,7 @@ function hasPath(object, path, hasFunc) {
}
var length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) &&
- (isArray(object) || isString(object) || isArguments(object));
+ (isArray(object) || isArguments(object));
}
/**
@@ -721,7 +695,7 @@ function toSource(func) {
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `delete`, `get`, `has`, and `set`.
*
* @static
@@ -780,7 +754,7 @@ memoize.Cache = MapCache;
/**
* 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.
*
* @static
@@ -833,7 +807,7 @@ function eq(value, other) {
* // => false
*/
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') &&
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
}
@@ -889,7 +863,7 @@ var isArray = Array.isArray;
* // => false
*/
function isArrayLike(value) {
- return value != null && isLength(getLength(value)) && !isFunction(value);
+ return value != null && isLength(value.length) && !isFunction(value);
}
/**
@@ -940,8 +914,7 @@ function isArrayLikeObject(value) {
*/
function isFunction(value) {
// 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) : '';
return tag == funcTag || tag == genTag;
}
@@ -949,16 +922,15 @@ function isFunction(value) {
/**
* Checks if `value` is a valid array-like length.
*
- * **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).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @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
*
* _.isLength(3);
@@ -980,7 +952,7 @@ function isLength(value) {
/**
* 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('')`)
*
* @static
@@ -1036,28 +1008,6 @@ function isObjectLike(value) {
return !!value && typeof value == 'object';
}
-/**
- * Checks if `value` is classified as a `String` primitive or object.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a string, else `false`.
- * @example
- *
- * _.isString('abc');
- * // => true
- *
- * _.isString(1);
- * // => false
- */
-function isString(value) {
- return typeof value == 'string' ||
- (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
-}
-
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
diff --git a/lodash.hasin/package.json b/lodash.hasin/package.json
index 631504a00..a0e8c527a 100644
--- a/lodash.hasin/package.json
+++ b/lodash.hasin/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.hasin",
- "version": "4.5.1",
+ "version": "4.5.2",
"description": "The lodash method `_.hasIn` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.invoke/README.md b/lodash.invoke/README.md
index 9f399f5c8..f7398010b 100644
--- a/lodash.invoke/README.md
+++ b/lodash.invoke/README.md
@@ -1,4 +1,4 @@
-# lodash.invoke v4.5.1
+# lodash.invoke v4.5.2
The [lodash](https://lodash.com/) method `_.invoke` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var invoke = require('lodash.invoke');
```
-See the [documentation](https://lodash.com/docs#invoke) or [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash.invoke) for more details.
+See the [documentation](https://lodash.com/docs#invoke) or [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash.invoke) for more details.
diff --git a/lodash.invoke/index.js b/lodash.invoke/index.js
index f0215bafc..1168a1f0f 100644
--- a/lodash.invoke/index.js
+++ b/lodash.invoke/index.js
@@ -29,7 +29,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/**
* 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).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -101,6 +101,7 @@ function isHostObject(value) {
/** Used for built-in method references. */
var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
@@ -113,14 +114,14 @@ var maskSrcKey = (function() {
}());
/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
+var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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.
*/
var objectToString = objectProto.toString;
@@ -454,7 +455,7 @@ MapCache.prototype.set = mapCacheSet;
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
- * @param {Array} array The array to search.
+ * @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
@@ -783,7 +784,7 @@ function last(array) {
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `delete`, `get`, `has`, and `set`.
*
* @static
@@ -842,7 +843,7 @@ memoize.Cache = MapCache;
/**
* 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.
*
* @static
@@ -920,15 +921,14 @@ var isArray = Array.isArray;
*/
function isFunction(value) {
// 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) : '';
return tag == funcTag || tag == genTag;
}
/**
* 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('')`)
*
* @static
diff --git a/lodash.invoke/package.json b/lodash.invoke/package.json
index aab37b772..6b53cf7fe 100644
--- a/lodash.invoke/package.json
+++ b/lodash.invoke/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.invoke",
- "version": "4.5.1",
+ "version": "4.5.2",
"description": "The lodash method `_.invoke` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.method/README.md b/lodash.method/README.md
index d2f0359fa..138b60c9f 100644
--- a/lodash.method/README.md
+++ b/lodash.method/README.md
@@ -1,4 +1,4 @@
-# lodash.method v4.5.1
+# lodash.method v4.5.2
The [lodash](https://lodash.com/) method `_.method` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var method = require('lodash.method');
```
-See the [documentation](https://lodash.com/docs#method) or [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash.method) for more details.
+See the [documentation](https://lodash.com/docs#method) or [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash.method) for more details.
diff --git a/lodash.method/index.js b/lodash.method/index.js
index 5adc8cadf..4fb85ff56 100644
--- a/lodash.method/index.js
+++ b/lodash.method/index.js
@@ -29,7 +29,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/**
* 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).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -101,6 +101,7 @@ function isHostObject(value) {
/** Used for built-in method references. */
var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
@@ -113,14 +114,14 @@ var maskSrcKey = (function() {
}());
/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
+var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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.
*/
var objectToString = objectProto.toString;
@@ -454,7 +455,7 @@ MapCache.prototype.set = mapCacheSet;
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
- * @param {Array} array The array to search.
+ * @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
@@ -783,7 +784,7 @@ function last(array) {
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `delete`, `get`, `has`, and `set`.
*
* @static
@@ -842,7 +843,7 @@ memoize.Cache = MapCache;
/**
* 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.
*
* @static
@@ -920,15 +921,14 @@ var isArray = Array.isArray;
*/
function isFunction(value) {
// 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) : '';
return tag == funcTag || tag == genTag;
}
/**
* 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('')`)
*
* @static
diff --git a/lodash.method/package.json b/lodash.method/package.json
index 9cb9af3c1..45aad5297 100644
--- a/lodash.method/package.json
+++ b/lodash.method/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.method",
- "version": "4.5.1",
+ "version": "4.5.2",
"description": "The lodash method `_.method` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.methodof/README.md b/lodash.methodof/README.md
index 4b47e492b..30ed348dc 100644
--- a/lodash.methodof/README.md
+++ b/lodash.methodof/README.md
@@ -1,4 +1,4 @@
-# lodash.methodof v4.5.1
+# lodash.methodof v4.5.2
The [lodash](https://lodash.com/) method `_.methodOf` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var methodOf = require('lodash.methodof');
```
-See the [documentation](https://lodash.com/docs#methodOf) or [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash.methodof) for more details.
+See the [documentation](https://lodash.com/docs#methodOf) or [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash.methodof) for more details.
diff --git a/lodash.methodof/index.js b/lodash.methodof/index.js
index 58288d6ce..6fae4a704 100644
--- a/lodash.methodof/index.js
+++ b/lodash.methodof/index.js
@@ -29,7 +29,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/**
* 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).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -101,6 +101,7 @@ function isHostObject(value) {
/** Used for built-in method references. */
var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
@@ -113,14 +114,14 @@ var maskSrcKey = (function() {
}());
/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
+var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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.
*/
var objectToString = objectProto.toString;
@@ -454,7 +455,7 @@ MapCache.prototype.set = mapCacheSet;
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
- * @param {Array} array The array to search.
+ * @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
@@ -783,7 +784,7 @@ function last(array) {
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `delete`, `get`, `has`, and `set`.
*
* @static
@@ -842,7 +843,7 @@ memoize.Cache = MapCache;
/**
* 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.
*
* @static
@@ -920,15 +921,14 @@ var isArray = Array.isArray;
*/
function isFunction(value) {
// 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) : '';
return tag == funcTag || tag == genTag;
}
/**
* 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('')`)
*
* @static
diff --git a/lodash.methodof/package.json b/lodash.methodof/package.json
index 891728c8c..6ed967e2c 100644
--- a/lodash.methodof/package.json
+++ b/lodash.methodof/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.methodof",
- "version": "4.5.1",
+ "version": "4.5.2",
"description": "The lodash method `_.methodOf` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.result/README.md b/lodash.result/README.md
index 12ed68496..7b0c6b9f3 100644
--- a/lodash.result/README.md
+++ b/lodash.result/README.md
@@ -1,4 +1,4 @@
-# lodash.result v4.5.1
+# lodash.result v4.5.2
The [lodash](https://lodash.com/) method `_.result` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var result = require('lodash.result');
```
-See the [documentation](https://lodash.com/docs#result) or [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash.result) for more details.
+See the [documentation](https://lodash.com/docs#result) or [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash.result) for more details.
diff --git a/lodash.result/index.js b/lodash.result/index.js
index 05fe3def5..be21ce612 100644
--- a/lodash.result/index.js
+++ b/lodash.result/index.js
@@ -29,7 +29,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/**
* 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).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -81,6 +81,7 @@ function isHostObject(value) {
/** Used for built-in method references. */
var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
@@ -93,14 +94,14 @@ var maskSrcKey = (function() {
}());
/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
+var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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.
*/
var objectToString = objectProto.toString;
@@ -431,7 +432,7 @@ MapCache.prototype.set = mapCacheSet;
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
- * @param {Array} array The array to search.
+ * @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
@@ -630,7 +631,7 @@ function toSource(func) {
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `delete`, `get`, `has`, and `set`.
*
* @static
@@ -689,7 +690,7 @@ memoize.Cache = MapCache;
/**
* 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.
*
* @static
@@ -767,15 +768,14 @@ var isArray = Array.isArray;
*/
function isFunction(value) {
// 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) : '';
return tag == funcTag || tag == genTag;
}
/**
* 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('')`)
*
* @static
diff --git a/lodash.result/package.json b/lodash.result/package.json
index 489a09b09..56e3694d6 100644
--- a/lodash.result/package.json
+++ b/lodash.result/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.result",
- "version": "4.5.1",
+ "version": "4.5.2",
"description": "The lodash method `_.result` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.topath/README.md b/lodash.topath/README.md
index 052cdcb71..9ad17980b 100644
--- a/lodash.topath/README.md
+++ b/lodash.topath/README.md
@@ -1,4 +1,4 @@
-# lodash.topath v4.5.1
+# lodash.topath v4.5.2
The [lodash](https://lodash.com/) method `_.toPath` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var toPath = require('lodash.topath');
```
-See the [documentation](https://lodash.com/docs#toPath) or [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash.topath) for more details.
+See the [documentation](https://lodash.com/docs#toPath) or [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash.topath) for more details.
diff --git a/lodash.topath/index.js b/lodash.topath/index.js
index f7a10e44d..a6ea7954f 100644
--- a/lodash.topath/index.js
+++ b/lodash.topath/index.js
@@ -27,7 +27,7 @@ var reLeadingDot = /^\./,
/**
* 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).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -99,6 +99,7 @@ function isHostObject(value) {
/** Used for built-in method references. */
var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
@@ -111,14 +112,14 @@ var maskSrcKey = (function() {
}());
/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
+var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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.
*/
var objectToString = objectProto.toString;
@@ -449,7 +450,7 @@ MapCache.prototype.set = mapCacheSet;
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
- * @param {Array} array The array to search.
+ * @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
@@ -635,7 +636,7 @@ function toSource(func) {
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `delete`, `get`, `has`, and `set`.
*
* @static
@@ -694,7 +695,7 @@ memoize.Cache = MapCache;
/**
* 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.
*
* @static
@@ -772,15 +773,14 @@ var isArray = Array.isArray;
*/
function isFunction(value) {
// 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) : '';
return tag == funcTag || tag == genTag;
}
/**
* 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('')`)
*
* @static
diff --git a/lodash.topath/package.json b/lodash.topath/package.json
index b5873aed9..986da0ff8 100644
--- a/lodash.topath/package.json
+++ b/lodash.topath/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.topath",
- "version": "4.5.1",
+ "version": "4.5.2",
"description": "The lodash method `_.toPath` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.unset/README.md b/lodash.unset/README.md
index 535f31c2a..8c8ec6c81 100644
--- a/lodash.unset/README.md
+++ b/lodash.unset/README.md
@@ -1,4 +1,4 @@
-# lodash.unset v4.5.1
+# lodash.unset v4.5.2
The [lodash](https://lodash.com/) method `_.unset` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var unset = require('lodash.unset');
```
-See the [documentation](https://lodash.com/docs#unset) or [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash.unset) for more details.
+See the [documentation](https://lodash.com/docs#unset) or [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash.unset) for more details.
diff --git a/lodash.unset/index.js b/lodash.unset/index.js
index 505d458da..44fe9034c 100644
--- a/lodash.unset/index.js
+++ b/lodash.unset/index.js
@@ -29,7 +29,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/**
* 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).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -79,22 +79,9 @@ function isHostObject(value) {
return result;
}
-/**
- * Creates a function that invokes `func` with its first argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
-function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
-}
-
/** Used for built-in method references. */
var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
@@ -107,14 +94,14 @@ var maskSrcKey = (function() {
}());
/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
+var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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.
*/
var objectToString = objectProto.toString;
@@ -129,9 +116,6 @@ var reIsNative = RegExp('^' +
var Symbol = root.Symbol,
splice = arrayProto.splice;
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeGetPrototype = Object.getPrototypeOf;
-
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map'),
nativeCreate = getNative(Object, 'create');
@@ -448,7 +432,7 @@ MapCache.prototype.set = mapCacheSet;
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
- * @param {Array} array The array to search.
+ * @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
@@ -482,23 +466,6 @@ function baseGet(object, path) {
return (index && index == length) ? object : undefined;
}
-/**
- * The base implementation of `_.has` without support for deep paths.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {Array|string} key The key to check.
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
- */
-function baseHas(object, key) {
- // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
- // that are composed entirely of index properties, return `false` for
- // `hasOwnProperty` checks of them.
- return object != null &&
- (hasOwnProperty.call(object, key) ||
- (typeof object == 'object' && key in object && getPrototype(object) === null));
-}
-
/**
* The base implementation of `_.isNative` without bad shim checks.
*
@@ -578,7 +545,7 @@ function baseUnset(object, path) {
object = parent(object, path);
var key = toKey(last(path));
- return !(object != null && baseHas(object, key)) || delete object[key];
+ return !(object != null && hasOwnProperty.call(object, key)) || delete object[key];
}
/**
@@ -620,15 +587,6 @@ function getNative(object, key) {
return baseIsNative(value) ? value : undefined;
}
-/**
- * Gets the `[[Prototype]]` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {null|Object} Returns the `[[Prototype]]`.
- */
-var getPrototype = overArg(nativeGetPrototype, Object);
-
/**
* Checks if `value` is a property name and not a property path.
*
@@ -770,7 +728,7 @@ function last(array) {
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `delete`, `get`, `has`, and `set`.
*
* @static
@@ -829,7 +787,7 @@ memoize.Cache = MapCache;
/**
* 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.
*
* @static
@@ -907,15 +865,14 @@ var isArray = Array.isArray;
*/
function isFunction(value) {
// 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) : '';
return tag == funcTag || tag == genTag;
}
/**
* 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('')`)
*
* @static
diff --git a/lodash.unset/package.json b/lodash.unset/package.json
index feab342e7..84e4f11b1 100644
--- a/lodash.unset/package.json
+++ b/lodash.unset/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.unset",
- "version": "4.5.1",
+ "version": "4.5.2",
"description": "The lodash method `_.unset` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",