Compare commits

...

4 Commits

Author SHA1 Message Date
John-David Dalton
826825a40a Bump to v4.5.5. 2019-07-09 21:54:46 -07:00
John-David Dalton
75c7a81c5c Bump to v4.5.4. 2019-07-09 21:54:45 -07:00
John-David Dalton
5338f5758c Bump to v4.5.3. 2019-07-09 21:54:45 -07:00
John-David Dalton
256725cf0a Bump to v4.5.2. 2019-07-09 21:54:45 -07:00
35 changed files with 518 additions and 630 deletions

View File

@@ -1,4 +1,4 @@
# lodash v4.5.1 # lodash v4.5.5
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method. The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.

View File

@@ -1,23 +1,47 @@
The MIT License (MIT) Copyright jQuery Foundation and other contributors <https://jquery.org/>
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> Based on Underscore.js, copyright Jeremy Ashkenas,
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining a copy This software consists of voluntary contributions made by many
of this software and associated documentation files (the "Software"), to deal individuals. For exact contribution history, see the revision history
in the Software without restriction, including without limitation the rights available at https://github.com/lodash/lodash
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all The following license applies to all parts of this software except as
copies or substantial portions of the Software. documented below:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ====
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE Permission is hereby granted, free of charge, to any person obtaining
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER a copy of this software and associated documentation files (the
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, "Software"), to deal in the Software without restriction, including
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE without limitation the rights to use, copy, modify, merge, publish,
SOFTWARE. distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====
Copyright and related rights for sample code are waived via CC0. Sample
code is defined as all source code displayed within the prose of the
documentation.
CC0: http://creativecommons.org/publicdomain/zero/1.0/
====
Files located in the node_modules and vendor directories are externally
maintained libraries used by this software which have their own
licenses; we recommend you read them, as their terms may differ from the
terms above.

View File

@@ -1,4 +1,4 @@
# lodash._baseclone v4.5.1 # lodash._baseclone v4.5.5
The internal [lodash](https://lodash.com/) function `baseClone` exported as a [Node.js](https://nodejs.org/) module. 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'); 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.5-npm-packages/lodash._baseclone) for more details.

View File

@@ -1,10 +1,10 @@
/** /**
* lodash 4.5.1 (Custom Build) <https://lodash.com/> * lodash 4.5.5 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./` * Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> * Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/ */
/** Used as the size to enable large array optimizations. */ /** Used as the size to enable large array optimizations. */
@@ -27,6 +27,7 @@ var argsTag = '[object Arguments]',
mapTag = '[object Map]', mapTag = '[object Map]',
numberTag = '[object Number]', numberTag = '[object Number]',
objectTag = '[object Object]', objectTag = '[object Object]',
promiseTag = '[object Promise]',
regexpTag = '[object RegExp]', regexpTag = '[object RegExp]',
setTag = '[object Set]', setTag = '[object Set]',
stringTag = '[object String]', stringTag = '[object String]',
@@ -34,6 +35,7 @@ var argsTag = '[object Arguments]',
weakMapTag = '[object WeakMap]'; weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]', var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]', float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]', float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]', int8Tag = '[object Int8Array]',
@@ -44,13 +46,16 @@ var arrayBufferTag = '[object ArrayBuffer]',
uint16Tag = '[object Uint16Array]', uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]'; uint32Tag = '[object Uint32Array]';
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */ /**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to match `RegExp` flags from their coerced string values. */ /** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/; var reFlags = /\w*$/;
/** Used to detect host constructors (Safari > 5). */ /** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/; var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used to detect unsigned integer values. */ /** Used to detect unsigned integer values. */
@@ -59,16 +64,16 @@ var reIsUint = /^(?:0|[1-9]\d*)$/;
/** Used to identify `toStringTag` values supported by `_.clone`. */ /** Used to identify `toStringTag` values supported by `_.clone`. */
var cloneableTags = {}; var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[argsTag] = cloneableTags[arrayTag] =
cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[boolTag] = cloneableTags[dateTag] =
cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] =
cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] =
cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[int32Tag] = cloneableTags[mapTag] =
cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[numberTag] = cloneableTags[objectTag] =
cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[regexpTag] = cloneableTags[setTag] =
cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[stringTag] = cloneableTags[symbolTag] =
cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
cloneableTags[uint32Tag] = true; cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[weakMapTag] = false; cloneableTags[weakMapTag] = false;
@@ -124,6 +129,7 @@ var root = freeGlobal ||
* @returns {Object} Returns `map`. * @returns {Object} Returns `map`.
*/ */
function addMapEntry(map, pair) { 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]); map.set(pair[0], pair[1]);
return map; return map;
} }
@@ -162,6 +168,25 @@ function arrayEach(array, iteratee) {
return array; return array;
} }
/**
* Appends the elements of `values` to `array`.
*
* @private
* @param {Array} array The array to modify.
* @param {Array} values The values to append.
* @returns {Array} Returns `array`.
*/
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
/** /**
* A specialized version of `_.reduce` for arrays without support for * A specialized version of `_.reduce` for arrays without support for
* iteratee shorthands. * iteratee shorthands.
@@ -170,7 +195,8 @@ function arrayEach(array, iteratee) {
* @param {Array} array The array to iterate over. * @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration. * @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value. * @param {*} [accumulator] The initial value.
* @param {boolean} [initAccum] Specify using the first element of `array` as the initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as
* the initial value.
* @returns {*} Returns the accumulated value. * @returns {*} Returns the accumulated value.
*/ */
function arrayReduce(array, iteratee, accumulator, initAccum) { function arrayReduce(array, iteratee, accumulator, initAccum) {
@@ -294,7 +320,8 @@ var funcToString = Function.prototype.toString;
var hasOwnProperty = objectProto.hasOwnProperty; var hasOwnProperty = objectProto.hasOwnProperty;
/** /**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values. * of values.
*/ */
var objectToString = objectProto.toString; var objectToString = objectProto.toString;
@@ -309,32 +336,36 @@ var reIsNative = RegExp('^' +
var Buffer = moduleExports ? root.Buffer : undefined, var Buffer = moduleExports ? root.Buffer : undefined,
Symbol = root.Symbol, Symbol = root.Symbol,
Uint8Array = root.Uint8Array, Uint8Array = root.Uint8Array,
getPrototypeOf = Object.getPrototypeOf,
getOwnPropertySymbols = Object.getOwnPropertySymbols, getOwnPropertySymbols = Object.getOwnPropertySymbols,
objectCreate = Object.create, objectCreate = Object.create,
propertyIsEnumerable = objectProto.propertyIsEnumerable, propertyIsEnumerable = objectProto.propertyIsEnumerable,
splice = arrayProto.splice; splice = arrayProto.splice;
/* Built-in method references for those with the same name as other `lodash` methods. */ /* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = Object.keys; var nativeGetPrototype = Object.getPrototypeOf,
nativeKeys = Object.keys;
/* Built-in method references that are verified to be native. */ /* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map'), var DataView = getNative(root, 'DataView'),
Map = getNative(root, 'Map'),
Promise = getNative(root, 'Promise'),
Set = getNative(root, 'Set'), Set = getNative(root, 'Set'),
WeakMap = getNative(root, 'WeakMap'), WeakMap = getNative(root, 'WeakMap'),
nativeCreate = getNative(Object, 'create'); nativeCreate = getNative(Object, 'create');
/** Used to detect maps, sets, and weakmaps. */ /** Used to detect maps, sets, and weakmaps. */
var mapCtorString = Map ? funcToString.call(Map) : '', var dataViewCtorString = toSource(DataView),
setCtorString = Set ? funcToString.call(Set) : '', mapCtorString = toSource(Map),
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : ''; promiseCtorString = toSource(Promise),
setCtorString = toSource(Set),
weakMapCtorString = toSource(WeakMap);
/** Used to convert symbols to primitives and strings. */ /** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined, var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = Symbol ? symbolProto.valueOf : undefined; symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/** /**
* Creates an hash object. * Creates a hash object.
* *
* @private * @private
* @constructor * @constructor
@@ -394,6 +425,9 @@ function hashSet(hash, key, value) {
hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
} }
// Avoid inheriting from `Object.prototype` when possible.
Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
/** /**
* Creates a map cache object to store key-value pairs. * Creates a map cache object to store key-value pairs.
* *
@@ -486,7 +520,7 @@ function mapHas(key) {
* @memberOf MapCache * @memberOf MapCache
* @param {string} key The key of the value to set. * @param {string} key The key of the value to set.
* @param {*} value The value to set. * @param {*} value The value to set.
* @returns {Object} Returns the map cache object. * @returns {Object} Returns the map cache instance.
*/ */
function mapSet(key, value) { function mapSet(key, value) {
var data = this.__data__; var data = this.__data__;
@@ -500,6 +534,13 @@ function mapSet(key, value) {
return this; return this;
} }
// Add methods to `MapCache`.
MapCache.prototype.clear = mapClear;
MapCache.prototype['delete'] = mapDelete;
MapCache.prototype.get = mapGet;
MapCache.prototype.has = mapHas;
MapCache.prototype.set = mapSet;
/** /**
* Creates a stack cache object to store key-value pairs. * Creates a stack cache object to store key-value pairs.
* *
@@ -585,7 +626,7 @@ function stackHas(key) {
* @memberOf Stack * @memberOf Stack
* @param {string} key The key of the value to set. * @param {string} key The key of the value to set.
* @param {*} value The value to set. * @param {*} value The value to set.
* @returns {Object} Returns the stack cache object. * @returns {Object} Returns the stack cache instance.
*/ */
function stackSet(key, value) { function stackSet(key, value) {
var data = this.__data__, var data = this.__data__,
@@ -606,11 +647,18 @@ function stackSet(key, value) {
return this; return this;
} }
// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
/** /**
* Removes `key` and its value from the associative array. * Removes `key` and its value from the associative array.
* *
* @private * @private
* @param {Array} array The array to query. * @param {Array} array The array to modify.
* @param {string} key The key of the value to remove. * @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/ */
@@ -654,8 +702,7 @@ function assocHas(array, key) {
} }
/** /**
* Gets the index at which the first occurrence of `key` is found in `array` * Gets the index at which the `key` is found in `array` of key-value pairs.
* of key-value pairs.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to search.
@@ -727,13 +774,14 @@ function baseAssign(object, source) {
* @private * @private
* @param {*} value The value to clone. * @param {*} value The value to clone.
* @param {boolean} [isDeep] Specify a deep clone. * @param {boolean} [isDeep] Specify a deep clone.
* @param {boolean} [isFull] Specify a clone including symbols.
* @param {Function} [customizer] The function to customize cloning. * @param {Function} [customizer] The function to customize cloning.
* @param {string} [key] The key of `value`. * @param {string} [key] The key of `value`.
* @param {Object} [object] The parent object of `value`. * @param {Object} [object] The parent object of `value`.
* @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
* @returns {*} Returns the cloned value. * @returns {*} Returns the cloned value.
*/ */
function baseClone(value, isDeep, customizer, key, object, stack) { function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
var result; var result;
if (customizer) { if (customizer) {
result = object ? customizer(value, key, object, stack) : customizer(value); result = object ? customizer(value, key, object, stack) : customizer(value);
@@ -769,7 +817,7 @@ function baseClone(value, isDeep, customizer, key, object, stack) {
if (!cloneableTags[tag]) { if (!cloneableTags[tag]) {
return object ? value : {}; return object ? value : {};
} }
result = initCloneByTag(value, tag, isDeep); result = initCloneByTag(value, tag, baseClone, isDeep);
} }
} }
// Check for circular references and return its corresponding clone. // Check for circular references and return its corresponding clone.
@@ -780,11 +828,18 @@ function baseClone(value, isDeep, customizer, key, object, stack) {
} }
stack.set(value, result); stack.set(value, result);
if (!isArr) {
var props = isFull ? getAllKeys(value) : keys(value);
}
// Recursively populate clone (susceptible to call stack limits). // Recursively populate clone (susceptible to call stack limits).
(isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { arrayEach(props || value, function(subValue, key) {
assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack)); if (props) {
key = subValue;
subValue = value[key];
}
assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
}); });
return isArr ? result : copySymbols(value, result); return result;
} }
/** /**
@@ -800,29 +855,21 @@ function baseCreate(proto) {
} }
/** /**
* The base implementation of `baseForIn` and `baseForOwn` which iterates * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
* over `object` properties returned by `keysFunc` invoking `iteratee` for * `keysFunc` and `symbolsFunc` to get the enumerable property names and
* each property. Iteratee functions may exit iteration early by explicitly * symbols of `object`.
* returning `false`.
* *
* @private * @private
* @param {Object} object The object to iterate over. * @param {Object} object The object to query.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`.
* @returns {Array} Returns the array of property names and symbols.
*/ */
var baseFor = createBaseFor(); function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
/** return isArray(object)
* The base implementation of `_.forOwn` without support for iteratee shorthands. ? result
* : arrayPush(result, symbolsFunc(object));
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwn(object, iteratee) {
return object && baseFor(object, iteratee, keys);
} }
/** /**
@@ -838,7 +885,7 @@ function baseHas(object, key) {
// that are composed entirely of index properties, return `false` for // that are composed entirely of index properties, return `false` for
// `hasOwnProperty` checks of them. // `hasOwnProperty` checks of them.
return hasOwnProperty.call(object, key) || return hasOwnProperty.call(object, key) ||
(typeof object == 'object' && key in object && getPrototypeOf(object) === null); (typeof object == 'object' && key in object && getPrototype(object) === null);
} }
/** /**
@@ -878,9 +925,7 @@ function cloneBuffer(buffer, isDeep) {
if (isDeep) { if (isDeep) {
return buffer.slice(); return buffer.slice();
} }
var Ctor = buffer.constructor, var result = new buffer.constructor(buffer.length);
result = new Ctor(buffer.length);
buffer.copy(result); buffer.copy(result);
return result; return result;
} }
@@ -893,24 +938,36 @@ function cloneBuffer(buffer, isDeep) {
* @returns {ArrayBuffer} Returns the cloned array buffer. * @returns {ArrayBuffer} Returns the cloned array buffer.
*/ */
function cloneArrayBuffer(arrayBuffer) { function cloneArrayBuffer(arrayBuffer) {
var Ctor = arrayBuffer.constructor, var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
result = new Ctor(arrayBuffer.byteLength), new Uint8Array(result).set(new Uint8Array(arrayBuffer));
view = new Uint8Array(result);
view.set(new Uint8Array(arrayBuffer));
return result; return result;
} }
/**
* Creates a clone of `dataView`.
*
* @private
* @param {Object} dataView The data view to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned data view.
*/
function cloneDataView(dataView, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
/** /**
* Creates a clone of `map`. * Creates a clone of `map`.
* *
* @private * @private
* @param {Object} map The map to clone. * @param {Object} map The map to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned map. * @returns {Object} Returns the cloned map.
*/ */
function cloneMap(map) { function cloneMap(map, isDeep, cloneFunc) {
var Ctor = map.constructor; var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
return arrayReduce(mapToArray(map), addMapEntry, new Ctor); return arrayReduce(array, addMapEntry, new map.constructor);
} }
/** /**
@@ -921,9 +978,7 @@ function cloneMap(map) {
* @returns {Object} Returns the cloned regexp. * @returns {Object} Returns the cloned regexp.
*/ */
function cloneRegExp(regexp) { function cloneRegExp(regexp) {
var Ctor = regexp.constructor, var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result = new Ctor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex; result.lastIndex = regexp.lastIndex;
return result; return result;
} }
@@ -933,11 +988,13 @@ function cloneRegExp(regexp) {
* *
* @private * @private
* @param {Object} set The set to clone. * @param {Object} set The set to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned set. * @returns {Object} Returns the cloned set.
*/ */
function cloneSet(set) { function cloneSet(set, isDeep, cloneFunc) {
var Ctor = set.constructor; var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
return arrayReduce(setToArray(set), addSetEntry, new Ctor); return arrayReduce(array, addSetEntry, new set.constructor);
} }
/** /**
@@ -948,7 +1005,7 @@ function cloneSet(set) {
* @returns {Object} Returns the cloned symbol object. * @returns {Object} Returns the cloned symbol object.
*/ */
function cloneSymbol(symbol) { function cloneSymbol(symbol) {
return Symbol ? Object(symbolValueOf.call(symbol)) : {}; return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
} }
/** /**
@@ -960,11 +1017,8 @@ function cloneSymbol(symbol) {
* @returns {Object} Returns the cloned typed array. * @returns {Object} Returns the cloned typed array.
*/ */
function cloneTypedArray(typedArray, isDeep) { function cloneTypedArray(typedArray, isDeep) {
var arrayBuffer = typedArray.buffer, var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer, return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
Ctor = typedArray.constructor;
return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
} }
/** /**
@@ -991,7 +1045,7 @@ function copyArray(source, array) {
* *
* @private * @private
* @param {Object} source The object to copy properties from. * @param {Object} source The object to copy properties from.
* @param {Array} props The property names to copy. * @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to. * @param {Object} [object={}] The object to copy properties to.
* @returns {Object} Returns `object`. * @returns {Object} Returns `object`.
*/ */
@@ -1005,7 +1059,7 @@ function copyObject(source, props, object) {
* *
* @private * @private
* @param {Object} source The object to copy properties from. * @param {Object} source The object to copy properties from.
* @param {Array} props The property names to copy. * @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to. * @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values. * @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`. * @returns {Object} Returns `object`.
@@ -1041,34 +1095,22 @@ function copySymbols(source, object) {
} }
/** /**
* Creates a base function for methods like `_.forIn`. * Creates an array of own enumerable property names and symbols of `object`.
* *
* @private * @private
* @param {boolean} [fromRight] Specify iterating from right to left. * @param {Object} object The object to query.
* @returns {Function} Returns the new base function. * @returns {Array} Returns the array of property names and symbols.
*/ */
function createBaseFor(fromRight) { function getAllKeys(object) {
return function(object, iteratee, keysFunc) { return baseGetAllKeys(object, keys, getSymbols);
var index = -1,
iterable = Object(object),
props = keysFunc(object),
length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
} }
/** /**
* Gets the "length" property value of `object`. * 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) * **Note:** This function is used to avoid a
* that affects Safari on at least iOS 8.1-8.3 ARM64. * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
* Safari on at least iOS 8.1-8.3 ARM64.
* *
* @private * @private
* @param {Object} object The object to query. * @param {Object} object The object to query.
@@ -1085,20 +1127,40 @@ var getLength = baseProperty('length');
* @returns {*} Returns the function if it's native, else `undefined`. * @returns {*} Returns the function if it's native, else `undefined`.
*/ */
function getNative(object, key) { function getNative(object, key) {
var value = object == null ? undefined : object[key]; var value = object[key];
return isNative(value) ? value : undefined; return isNative(value) ? value : undefined;
} }
/** /**
* Creates an array of the own symbol properties of `object`. * Gets the `[[Prototype]]` of `value`.
*
* @private
* @param {*} value The value to query.
* @returns {null|Object} Returns the `[[Prototype]]`.
*/
function getPrototype(value) {
return nativeGetPrototype(Object(value));
}
/**
* Creates an array of the own enumerable symbol properties of `object`.
* *
* @private * @private
* @param {Object} object The object to query. * @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols. * @returns {Array} Returns the array of symbols.
*/ */
var getSymbols = getOwnPropertySymbols || function() { function getSymbols(object) {
return []; // Coerce `object` to an object to avoid non-object errors in V8.
}; // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details.
return getOwnPropertySymbols(Object(object));
}
// Fallback for IE < 11.
if (!getOwnPropertySymbols) {
getSymbols = function() {
return [];
};
}
/** /**
* Gets the `toStringTag` of `value`. * Gets the `toStringTag` of `value`.
@@ -1111,18 +1173,23 @@ function getTag(value) {
return objectToString.call(value); return objectToString.call(value);
} }
// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps. // Fallback for data views, maps, sets, and weak maps in IE 11,
if ((Map && getTag(new Map) != mapTag) || // for data views in Edge, and promises in Node.js.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
(Set && getTag(new Set) != setTag) || (Set && getTag(new Set) != setTag) ||
(WeakMap && getTag(new WeakMap) != weakMapTag)) { (WeakMap && getTag(new WeakMap) != weakMapTag)) {
getTag = function(value) { getTag = function(value) {
var result = objectToString.call(value), var result = objectToString.call(value),
Ctor = result == objectTag ? value.constructor : null, Ctor = result == objectTag ? value.constructor : undefined,
ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : ''; ctorString = Ctor ? toSource(Ctor) : undefined;
if (ctorString) { if (ctorString) {
switch (ctorString) { switch (ctorString) {
case dataViewCtorString: return dataViewTag;
case mapCtorString: return mapTag; case mapCtorString: return mapTag;
case promiseCtorString: return promiseTag;
case setCtorString: return setTag; case setCtorString: return setTag;
case weakMapCtorString: return weakMapTag; case weakMapCtorString: return weakMapTag;
} }
@@ -1158,8 +1225,8 @@ function initCloneArray(array) {
* @returns {Object} Returns the initialized clone. * @returns {Object} Returns the initialized clone.
*/ */
function initCloneObject(object) { function initCloneObject(object) {
return (isFunction(object.constructor) && !isPrototype(object)) return (typeof object.constructor == 'function' && !isPrototype(object))
? baseCreate(getPrototypeOf(object)) ? baseCreate(getPrototype(object))
: {}; : {};
} }
@@ -1172,10 +1239,11 @@ function initCloneObject(object) {
* @private * @private
* @param {Object} object The object to clone. * @param {Object} object The object to clone.
* @param {string} tag The `toStringTag` of the object to clone. * @param {string} tag The `toStringTag` of the object to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone. * @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the initialized clone. * @returns {Object} Returns the initialized clone.
*/ */
function initCloneByTag(object, tag, isDeep) { function initCloneByTag(object, tag, cloneFunc, isDeep) {
var Ctor = object.constructor; var Ctor = object.constructor;
switch (tag) { switch (tag) {
case arrayBufferTag: case arrayBufferTag:
@@ -1185,13 +1253,16 @@ function initCloneByTag(object, tag, isDeep) {
case dateTag: case dateTag:
return new Ctor(+object); return new Ctor(+object);
case dataViewTag:
return cloneDataView(object, isDeep);
case float32Tag: case float64Tag: case float32Tag: case float64Tag:
case int8Tag: case int16Tag: case int32Tag: case int8Tag: case int16Tag: case int32Tag:
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
return cloneTypedArray(object, isDeep); return cloneTypedArray(object, isDeep);
case mapTag: case mapTag:
return cloneMap(object); return cloneMap(object, isDeep, cloneFunc);
case numberTag: case numberTag:
case stringTag: case stringTag:
@@ -1201,7 +1272,7 @@ function initCloneByTag(object, tag, isDeep) {
return cloneRegExp(object); return cloneRegExp(object);
case setTag: case setTag:
return cloneSet(object); return cloneSet(object, isDeep, cloneFunc);
case symbolTag: case symbolTag:
return cloneSymbol(object); return cloneSymbol(object);
@@ -1247,17 +1318,38 @@ function isKeyable(value) {
*/ */
function isPrototype(value) { function isPrototype(value) {
var Ctor = value && value.constructor, var Ctor = value && value.constructor,
proto = (isFunction(Ctor) && Ctor.prototype) || objectProto; proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto; return value === proto;
} }
/** /**
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) * Converts `func` to its source code.
*
* @private
* @param {Function} func The function to process.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent. * comparison between two values to determine if they are equivalent.
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 4.0.0
* @category Lang * @category Lang
* @param {*} value The value to compare. * @param {*} value The value to compare.
* @param {*} other The other value to compare. * @param {*} other The other value to compare.
@@ -1291,9 +1383,11 @@ function eq(value, other) {
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 0.1.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. * @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example * @example
* *
* _.isArguments(function() { return arguments; }()); * _.isArguments(function() { return arguments; }());
@@ -1313,10 +1407,12 @@ function isArguments(value) {
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 0.1.0
* @type {Function} * @type {Function}
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. * @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example * @example
* *
* _.isArray([1, 2, 3]); * _.isArray([1, 2, 3]);
@@ -1340,6 +1436,7 @@ var isArray = Array.isArray;
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 4.0.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
@@ -1358,8 +1455,7 @@ var isArray = Array.isArray;
* // => false * // => false
*/ */
function isArrayLike(value) { function isArrayLike(value) {
return value != null && return value != null && isLength(getLength(value)) && !isFunction(value);
!(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
} }
/** /**
@@ -1368,9 +1464,11 @@ function isArrayLike(value) {
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 4.0.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. * @returns {boolean} Returns `true` if `value` is an array-like object,
* else `false`.
* @example * @example
* *
* _.isArrayLikeObject([1, 2, 3]); * _.isArrayLikeObject([1, 2, 3]);
@@ -1394,6 +1492,7 @@ function isArrayLikeObject(value) {
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 4.3.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
@@ -1414,9 +1513,11 @@ var isBuffer = !Buffer ? constant(false) : function(value) {
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 0.1.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. * @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example * @example
* *
* _.isFunction(_); * _.isFunction(_);
@@ -1427,8 +1528,8 @@ var isBuffer = !Buffer ? constant(false) : function(value) {
*/ */
function isFunction(value) { function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array constructors, and // in Safari 8 which returns 'object' for typed array and weak map constructors,
// PhantomJS 1.9 which returns 'function' for `NodeList` instances. // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : ''; var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag; return tag == funcTag || tag == genTag;
} }
@@ -1436,13 +1537,16 @@ function isFunction(value) {
/** /**
* Checks if `value` is a valid array-like length. * 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 function is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 4.0.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @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 * @example
* *
* _.isLength(3); * _.isLength(3);
@@ -1463,11 +1567,13 @@ function isLength(value) {
} }
/** /**
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. * Checks if `value` is the
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 0.1.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -1496,6 +1602,7 @@ function isObject(value) {
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 4.0.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
@@ -1522,9 +1629,11 @@ function isObjectLike(value) {
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 3.0.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function, else `false`. * @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
* @example * @example
* *
* _.isNative(Array.prototype.push); * _.isNative(Array.prototype.push);
@@ -1534,24 +1643,23 @@ function isObjectLike(value) {
* // => false * // => false
*/ */
function isNative(value) { function isNative(value) {
if (value == null) { if (!isObject(value)) {
return false; return false;
} }
if (isFunction(value)) { var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
return reIsNative.test(funcToString.call(value)); return pattern.test(toSource(value));
}
return isObjectLike(value) &&
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
} }
/** /**
* Checks if `value` is classified as a `String` primitive or object. * Checks if `value` is classified as a `String` primitive or object.
* *
* @static * @static
* @since 0.1.0
* @memberOf _ * @memberOf _
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. * @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example * @example
* *
* _.isString('abc'); * _.isString('abc');
@@ -1573,6 +1681,7 @@ function isString(value) {
* for more details. * for more details.
* *
* @static * @static
* @since 0.1.0
* @memberOf _ * @memberOf _
* @category Object * @category Object
* @param {Object} object The object to query. * @param {Object} object The object to query.
@@ -1617,6 +1726,7 @@ function keys(object) {
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 2.4.0
* @category Util * @category Util
* @param {*} value The value to return from the new function. * @param {*} value The value to return from the new function.
* @returns {Function} Returns the new function. * @returns {Function} Returns the new function.
@@ -1634,21 +1744,4 @@ function constant(value) {
}; };
} }
// Avoid inheriting from `Object.prototype` when possible.
Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
// Add functions to the `MapCache`.
MapCache.prototype.clear = mapClear;
MapCache.prototype['delete'] = mapDelete;
MapCache.prototype.get = mapGet;
MapCache.prototype.has = mapHas;
MapCache.prototype.set = mapSet;
// Add functions to the `Stack` cache.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
module.exports = baseClone; module.exports = baseClone;

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash._baseclone", "name": "lodash._baseclone",
"version": "4.5.1", "version": "4.5.5",
"description": "The internal lodash function `baseClone` exported as a module.", "description": "The internal lodash function `baseClone` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",
@@ -8,7 +8,7 @@
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [ "contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)", "Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)" "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
], ],
"repository": "lodash/lodash", "repository": "lodash/lodash",

View File

@@ -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. 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'); 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.

View File

@@ -1,5 +1,5 @@
/** /**
* lodash 4.5.1 (Custom Build) <https://lodash.com/> * lodash 4.5.2 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./` * Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@@ -7,16 +7,16 @@
* Available under MIT license <https://lodash.com/license> * Available under MIT license <https://lodash.com/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. */ /** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200; var LARGE_ARRAY_SIZE = 200;
/** Used to stand-in for `undefined` hash values. */ /** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__'; 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. */ /** Used as references for various `Number` constants. */
var INFINITY = 1 / 0, var INFINITY = 1 / 0,
MAX_SAFE_INTEGER = 9007199254740991; MAX_SAFE_INTEGER = 9007199254740991;
@@ -317,8 +317,8 @@ var mapCtorString = Map ? funcToString.call(Map) : '',
/** Used to convert symbols to primitives and strings. */ /** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined, var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = Symbol ? symbolProto.valueOf : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
symbolToString = Symbol ? symbolProto.toString : undefined; symbolToString = symbolProto ? symbolProto.toString : undefined;
/** /**
* Creates an hash object. * Creates an hash object.
@@ -782,33 +782,28 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
if (!objIsArr) { if (!objIsArr) {
objTag = getTag(object); objTag = getTag(object);
if (objTag == argsTag) { objTag = objTag == argsTag ? objectTag : objTag;
objTag = objectTag;
} else if (objTag != objectTag) {
objIsArr = isTypedArray(object);
}
} }
if (!othIsArr) { if (!othIsArr) {
othTag = getTag(other); othTag = getTag(other);
if (othTag == argsTag) { othTag = othTag == argsTag ? objectTag : othTag;
othTag = objectTag;
} else if (othTag != objectTag) {
othIsArr = isTypedArray(other);
}
} }
var objIsObj = objTag == objectTag && !isHostObject(object), var objIsObj = objTag == objectTag && !isHostObject(object),
othIsObj = othTag == objectTag && !isHostObject(other), othIsObj = othTag == objectTag && !isHostObject(other),
isSameTag = objTag == othTag; isSameTag = objTag == othTag;
if (isSameTag && !(objIsArr || objIsObj)) { if (isSameTag && !objIsObj) {
return equalByTag(object, other, objTag, equalFunc, customizer, bitmask); 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 (!(bitmask & PARTIAL_COMPARE_FLAG)) {
if (!isPartial) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (objIsWrapped || othIsWrapped) { if (objIsWrapped || othIsWrapped) {
stack || (stack = new Stack);
return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, 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; return false;
} }
stack || (stack = new Stack); 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} array The array to compare.
* @param {Array} other The other array to compare. * @param {Array} other The other array to compare.
* @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} [customizer] The function to customize comparisons. * @param {Function} customizer The function to customize comparisons.
* @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
* @param {Object} [stack] Tracks traversed `array` and `other` objects. * @param {Object} stack Tracks traversed `array` and `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/ */
function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { 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 {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare. * @param {string} tag The `toStringTag` of the objects to compare.
* @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} [customizer] The function to customize comparisons. * @param {Function} customizer The function to customize comparisons.
* @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. * @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`. * @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) { switch (tag) {
case arrayBufferTag: case arrayBufferTag:
if ((object.byteLength != other.byteLength) || if ((object.byteLength != other.byteLength) ||
@@ -1122,12 +1118,21 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {
var isPartial = bitmask & PARTIAL_COMPARE_FLAG; var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
convert || (convert = setToArray); 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). // Recursively compare objects (susceptible to call stack limits).
return (isPartial || object.size == other.size) && return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask | UNORDERED_COMPARE_FLAG, stack.set(object, other));
equalFunc(convert(object), convert(other), customizer, bitmask | UNORDERED_COMPARE_FLAG);
case symbolTag: case symbolTag:
return !!Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other)); if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
} }
return false; return false;
} }
@@ -1140,9 +1145,9 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {
* @param {Object} object The object to compare. * @param {Object} object The object to compare.
* @param {Object} other The other object to compare. * @param {Object} other The other object to compare.
* @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} [customizer] The function to customize comparisons. * @param {Function} customizer The function to customize comparisons.
* @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
* @param {Object} [stack] Tracks traversed `object` and `other` objects. * @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/ */
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { 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`. * @returns {*} Returns the function if it's native, else `undefined`.
*/ */
function getNative(object, key) { function getNative(object, key) {
var value = object == null ? undefined : object[key]; var value = object[key];
return isNative(value) ? value : undefined; return isNative(value) ? value : undefined;
} }
@@ -1365,7 +1370,7 @@ function isKeyable(value) {
*/ */
function isPrototype(value) { function isPrototype(value) {
var Ctor = value && value.constructor, var Ctor = value && value.constructor,
proto = (isFunction(Ctor) && Ctor.prototype) || objectProto; proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto; return value === proto;
} }
@@ -1533,8 +1538,7 @@ var isArray = Array.isArray;
* // => false * // => false
*/ */
function isArrayLike(value) { function isArrayLike(value) {
return value != null && return value != null && isLength(getLength(value)) && !isFunction(value);
!(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
} }
/** /**
@@ -1582,8 +1586,8 @@ function isArrayLikeObject(value) {
*/ */
function isFunction(value) { function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array constructors, and // in Safari 8 which returns 'object' for typed array and weak map constructors,
// PhantomJS 1.9 which returns 'function' for `NodeList` instances. // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : ''; var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag; return tag == funcTag || tag == genTag;
} }
@@ -1791,7 +1795,7 @@ function toString(value) {
return ''; return '';
} }
if (isSymbol(value)) { if (isSymbol(value)) {
return Symbol ? symbolToString.call(value) : ''; return symbolToString ? symbolToString.call(value) : '';
} }
var result = (value + ''); var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash._baseiteratee", "name": "lodash._baseiteratee",
"version": "4.5.1", "version": "4.5.2",
"description": "The internal lodash function `baseIteratee` exported as a module.", "description": "The internal lodash function `baseIteratee` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",
@@ -8,7 +8,7 @@
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [ "contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)", "Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)" "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
], ],
"repository": "lodash/lodash", "repository": "lodash/lodash",

View File

@@ -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. 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'); 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.

View File

@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** /**
* Used to match `RegExp` * 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; 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 * @private
* @param {Function} func The function to wrap. * @param {Function} func The function to wrap.
@@ -310,6 +310,7 @@ function setToArray(set) {
/** Used for built-in method references. */ /** Used for built-in method references. */
var arrayProto = Array.prototype, var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype; objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */ /** Used to detect overreaching core-js shims. */
@@ -322,14 +323,14 @@ var maskSrcKey = (function() {
}()); }());
/** Used to resolve the decompiled source of functions. */ /** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString; var funcToString = funcProto.toString;
/** Used to check objects for own properties. */ /** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty; var hasOwnProperty = objectProto.hasOwnProperty;
/** /**
* Used to resolve the * 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. * of values.
*/ */
var objectToString = objectProto.toString; var objectToString = objectProto.toString;
@@ -347,8 +348,7 @@ var Symbol = root.Symbol,
splice = arrayProto.splice; splice = arrayProto.splice;
/* Built-in method references for those with the same name as other `lodash` methods. */ /* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetPrototype = Object.getPrototypeOf, var nativeKeys = overArg(Object.keys, Object),
nativeKeys = Object.keys,
nativeMax = Math.max; nativeMax = Math.max;
/* Built-in method references that are verified to be native. */ /* Built-in method references that are verified to be native. */
@@ -817,11 +817,38 @@ Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas; Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet; 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. * Gets the index at which the `key` is found in `array` of key-value pairs.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {*} key The key to search for. * @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`. * @returns {number} Returns the index of the matched value, else `-1`.
*/ */
@@ -866,23 +893,6 @@ function baseGetTag(value) {
return objectToString.call(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. * 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 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
* property of prototypes or treat sparse arrays as dense.
* *
* @private * @private
* @param {Object} object The object to query. * @param {Object} object The object to query.
* @returns {Array} Returns the array of property names. * @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`. * 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 regexpTag:
case stringTag: case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects, // 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. // for more details.
return object == (other + ''); return object == (other + '');
@@ -1389,7 +1409,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
var index = objLength; var index = objLength;
while (index--) { while (index--) {
var key = objProps[index]; var key = objProps[index];
if (!(isPartial ? key in other : baseHas(other, key))) { if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false; return false;
} }
} }
@@ -1440,19 +1460,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
return result; 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`. * Gets the data for `map`.
* *
@@ -1501,15 +1508,6 @@ function getNative(object, key) {
return baseIsNative(value) ? value : undefined; 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`. * Gets the `toStringTag` of `value`.
* *
@@ -1520,7 +1518,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
var getTag = baseGetTag; var getTag = baseGetTag;
// Fallback for data views, maps, sets, and weak maps in IE 11, // 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) || if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) || (Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) || (Promise && getTag(Promise.resolve()) != promiseTag) ||
@@ -1572,24 +1570,7 @@ function hasPath(object, path, hasFunc) {
} }
var length = object ? object.length : 0; var length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) && return !!length && isLength(length) && isIndex(key, length) &&
(isArray(object) || isString(object) || isArguments(object)); (isArray(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;
} }
/** /**
@@ -1762,7 +1743,7 @@ function toSource(func) {
* **Note:** The cache is exposed as the `cache` property on the memoized * **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache` * function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the * 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`. * method interface of `delete`, `get`, `has`, and `set`.
* *
* @static * @static
@@ -1821,7 +1802,7 @@ memoize.Cache = MapCache;
/** /**
* Performs a * 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. * comparison between two values to determine if they are equivalent.
* *
* @static * @static
@@ -1874,7 +1855,7 @@ function eq(value, other) {
* // => false * // => false
*/ */
function isArguments(value) { 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') && return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
} }
@@ -1930,7 +1911,7 @@ var isArray = Array.isArray;
* // => false * // => false
*/ */
function isArrayLike(value) { 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) { function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array and weak map constructors, // in Safari 8-9 which returns 'object' for typed array and other constructors.
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : ''; var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag; return tag == funcTag || tag == genTag;
} }
@@ -1990,16 +1970,15 @@ function isFunction(value) {
/** /**
* Checks if `value` is a valid array-like length. * Checks if `value` is a valid array-like length.
* *
* **Note:** This function is loosely based on * **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 4.0.0 * @since 4.0.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* else `false`.
* @example * @example
* *
* _.isLength(3); * _.isLength(3);
@@ -2021,7 +2000,7 @@ function isLength(value) {
/** /**
* Checks if `value` is the * 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('')`) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* *
* @static * @static
@@ -2077,28 +2056,6 @@ function isObjectLike(value) {
return !!value && typeof value == 'object'; 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. * 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`. * Creates an array of the own enumerable property names of `object`.
* *
* **Note:** Non-object values are coerced to objects. See the * **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. * for more details.
* *
* @static * @static
@@ -2254,23 +2211,7 @@ function hasIn(object, path) {
* // => ['0', '1'] * // => ['0', '1']
*/ */
function keys(object) { function keys(object) {
var isProto = isPrototype(object); return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(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;
} }
/** /**

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.cond", "name": "lodash.cond",
"version": "4.5.1", "version": "4.5.2",
"description": "The lodash method `_.cond` exported as a module.", "description": "The lodash method `_.cond` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",

View File

@@ -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. 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'); 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.

View File

@@ -21,7 +21,6 @@ var INFINITY = 1 / 0,
var argsTag = '[object Arguments]', var argsTag = '[object Arguments]',
funcTag = '[object Function]', funcTag = '[object Function]',
genTag = '[object GeneratorFunction]', genTag = '[object GeneratorFunction]',
stringTag = '[object String]',
symbolTag = '[object Symbol]'; symbolTag = '[object Symbol]';
/** Used to match property names within property paths. */ /** Used to match property names within property paths. */
@@ -32,7 +31,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** /**
* Used to match `RegExp` * 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; 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. */ /** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')(); 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`. * Gets the value at `key` of `object`.
* *
@@ -98,22 +84,9 @@ function isHostObject(value) {
return result; 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. */ /** Used for built-in method references. */
var arrayProto = Array.prototype, var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype; objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */ /** Used to detect overreaching core-js shims. */
@@ -126,14 +99,14 @@ var maskSrcKey = (function() {
}()); }());
/** Used to resolve the decompiled source of functions. */ /** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString; var funcToString = funcProto.toString;
/** Used to check objects for own properties. */ /** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty; var hasOwnProperty = objectProto.hasOwnProperty;
/** /**
* Used to resolve the * 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. * of values.
*/ */
var objectToString = objectProto.toString; var objectToString = objectProto.toString;
@@ -149,9 +122,6 @@ var Symbol = root.Symbol,
propertyIsEnumerable = objectProto.propertyIsEnumerable, propertyIsEnumerable = objectProto.propertyIsEnumerable,
splice = arrayProto.splice; 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. */ /* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map'), var Map = getNative(root, 'Map'),
nativeCreate = getNative(Object, 'create'); 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. * Gets the index at which the `key` is found in `array` of key-value pairs.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {*} key The key to search for. * @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`. * @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`. * @returns {boolean} Returns `true` if `key` exists, else `false`.
*/ */
function baseHas(object, key) { function baseHas(object, key) {
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, return object != null && hasOwnProperty.call(object, key);
// 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));
} }
/** /**
@@ -546,19 +511,6 @@ function castPath(value) {
return isArray(value) ? value : stringToPath(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`. * Gets the data for `map`.
* *
@@ -587,15 +539,6 @@ function getNative(object, key) {
return baseIsNative(value) ? value : undefined; 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`. * Checks if `path` exists on `object`.
* *
@@ -624,7 +567,7 @@ function hasPath(object, path, hasFunc) {
} }
var length = object ? object.length : 0; var length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) && 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 * **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache` * function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the * 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`. * method interface of `delete`, `get`, `has`, and `set`.
* *
* @static * @static
@@ -811,7 +754,7 @@ memoize.Cache = MapCache;
/** /**
* Performs a * 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. * comparison between two values to determine if they are equivalent.
* *
* @static * @static
@@ -864,7 +807,7 @@ function eq(value, other) {
* // => false * // => false
*/ */
function isArguments(value) { 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') && return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
} }
@@ -920,7 +863,7 @@ var isArray = Array.isArray;
* // => false * // => false
*/ */
function isArrayLike(value) { 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) { function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array and weak map constructors, // in Safari 8-9 which returns 'object' for typed array and other constructors.
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : ''; var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag; return tag == funcTag || tag == genTag;
} }
@@ -980,16 +922,15 @@ function isFunction(value) {
/** /**
* Checks if `value` is a valid array-like length. * Checks if `value` is a valid array-like length.
* *
* **Note:** This function is loosely based on * **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 4.0.0 * @since 4.0.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* else `false`.
* @example * @example
* *
* _.isLength(3); * _.isLength(3);
@@ -1011,7 +952,7 @@ function isLength(value) {
/** /**
* Checks if `value` is the * 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('')`) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* *
* @static * @static
@@ -1067,28 +1008,6 @@ function isObjectLike(value) {
return !!value && typeof value == 'object'; 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. * Checks if `value` is classified as a `Symbol` primitive or object.
* *

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.has", "name": "lodash.has",
"version": "4.5.1", "version": "4.5.2",
"description": "The lodash method `_.has` exported as a module.", "description": "The lodash method `_.has` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",

View File

@@ -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. 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'); 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.

View File

@@ -21,7 +21,6 @@ var INFINITY = 1 / 0,
var argsTag = '[object Arguments]', var argsTag = '[object Arguments]',
funcTag = '[object Function]', funcTag = '[object Function]',
genTag = '[object GeneratorFunction]', genTag = '[object GeneratorFunction]',
stringTag = '[object String]',
symbolTag = '[object Symbol]'; symbolTag = '[object Symbol]';
/** Used to match property names within property paths. */ /** Used to match property names within property paths. */
@@ -32,7 +31,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** /**
* Used to match `RegExp` * 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; 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. */ /** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')(); 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`. * Gets the value at `key` of `object`.
* *
@@ -100,6 +86,7 @@ function isHostObject(value) {
/** Used for built-in method references. */ /** Used for built-in method references. */
var arrayProto = Array.prototype, var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype; objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */ /** Used to detect overreaching core-js shims. */
@@ -112,14 +99,14 @@ var maskSrcKey = (function() {
}()); }());
/** Used to resolve the decompiled source of functions. */ /** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString; var funcToString = funcProto.toString;
/** Used to check objects for own properties. */ /** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty; var hasOwnProperty = objectProto.hasOwnProperty;
/** /**
* Used to resolve the * 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. * of values.
*/ */
var objectToString = objectProto.toString; 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. * Gets the index at which the `key` is found in `array` of key-value pairs.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {*} key The key to search for. * @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`. * @returns {number} Returns the index of the matched value, else `-1`.
*/ */
@@ -524,19 +511,6 @@ function castPath(value) {
return isArray(value) ? value : stringToPath(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`. * Gets the data for `map`.
* *
@@ -593,7 +567,7 @@ function hasPath(object, path, hasFunc) {
} }
var length = object ? object.length : 0; var length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) && 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 * **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache` * function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the * 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`. * method interface of `delete`, `get`, `has`, and `set`.
* *
* @static * @static
@@ -780,7 +754,7 @@ memoize.Cache = MapCache;
/** /**
* Performs a * 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. * comparison between two values to determine if they are equivalent.
* *
* @static * @static
@@ -833,7 +807,7 @@ function eq(value, other) {
* // => false * // => false
*/ */
function isArguments(value) { 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') && return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
} }
@@ -889,7 +863,7 @@ var isArray = Array.isArray;
* // => false * // => false
*/ */
function isArrayLike(value) { 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) { function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array and weak map constructors, // in Safari 8-9 which returns 'object' for typed array and other constructors.
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : ''; var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag; return tag == funcTag || tag == genTag;
} }
@@ -949,16 +922,15 @@ function isFunction(value) {
/** /**
* Checks if `value` is a valid array-like length. * Checks if `value` is a valid array-like length.
* *
* **Note:** This function is loosely based on * **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 4.0.0 * @since 4.0.0
* @category Lang * @category Lang
* @param {*} value The value to check. * @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* else `false`.
* @example * @example
* *
* _.isLength(3); * _.isLength(3);
@@ -980,7 +952,7 @@ function isLength(value) {
/** /**
* Checks if `value` is the * 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('')`) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* *
* @static * @static
@@ -1036,28 +1008,6 @@ function isObjectLike(value) {
return !!value && typeof value == 'object'; 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. * Checks if `value` is classified as a `Symbol` primitive or object.
* *

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.hasin", "name": "lodash.hasin",
"version": "4.5.1", "version": "4.5.2",
"description": "The lodash method `_.hasIn` exported as a module.", "description": "The lodash method `_.hasIn` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",

View File

@@ -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. 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'); 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.

View File

@@ -29,7 +29,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** /**
* Used to match `RegExp` * 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; var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -101,6 +101,7 @@ function isHostObject(value) {
/** Used for built-in method references. */ /** Used for built-in method references. */
var arrayProto = Array.prototype, var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype; objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */ /** Used to detect overreaching core-js shims. */
@@ -113,14 +114,14 @@ var maskSrcKey = (function() {
}()); }());
/** Used to resolve the decompiled source of functions. */ /** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString; var funcToString = funcProto.toString;
/** Used to check objects for own properties. */ /** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty; var hasOwnProperty = objectProto.hasOwnProperty;
/** /**
* Used to resolve the * 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. * of values.
*/ */
var objectToString = objectProto.toString; 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. * Gets the index at which the `key` is found in `array` of key-value pairs.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {*} key The key to search for. * @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`. * @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 * **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache` * function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the * 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`. * method interface of `delete`, `get`, `has`, and `set`.
* *
* @static * @static
@@ -842,7 +843,7 @@ memoize.Cache = MapCache;
/** /**
* Performs a * 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. * comparison between two values to determine if they are equivalent.
* *
* @static * @static
@@ -920,15 +921,14 @@ var isArray = Array.isArray;
*/ */
function isFunction(value) { function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array and weak map constructors, // in Safari 8-9 which returns 'object' for typed array and other constructors.
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : ''; var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag; return tag == funcTag || tag == genTag;
} }
/** /**
* Checks if `value` is the * 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('')`) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* *
* @static * @static

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.invoke", "name": "lodash.invoke",
"version": "4.5.1", "version": "4.5.2",
"description": "The lodash method `_.invoke` exported as a module.", "description": "The lodash method `_.invoke` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",

View File

@@ -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. 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'); 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.

View File

@@ -29,7 +29,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** /**
* Used to match `RegExp` * 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; var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -101,6 +101,7 @@ function isHostObject(value) {
/** Used for built-in method references. */ /** Used for built-in method references. */
var arrayProto = Array.prototype, var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype; objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */ /** Used to detect overreaching core-js shims. */
@@ -113,14 +114,14 @@ var maskSrcKey = (function() {
}()); }());
/** Used to resolve the decompiled source of functions. */ /** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString; var funcToString = funcProto.toString;
/** Used to check objects for own properties. */ /** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty; var hasOwnProperty = objectProto.hasOwnProperty;
/** /**
* Used to resolve the * 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. * of values.
*/ */
var objectToString = objectProto.toString; 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. * Gets the index at which the `key` is found in `array` of key-value pairs.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {*} key The key to search for. * @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`. * @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 * **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache` * function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the * 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`. * method interface of `delete`, `get`, `has`, and `set`.
* *
* @static * @static
@@ -842,7 +843,7 @@ memoize.Cache = MapCache;
/** /**
* Performs a * 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. * comparison between two values to determine if they are equivalent.
* *
* @static * @static
@@ -920,15 +921,14 @@ var isArray = Array.isArray;
*/ */
function isFunction(value) { function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array and weak map constructors, // in Safari 8-9 which returns 'object' for typed array and other constructors.
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : ''; var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag; return tag == funcTag || tag == genTag;
} }
/** /**
* Checks if `value` is the * 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('')`) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* *
* @static * @static

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.method", "name": "lodash.method",
"version": "4.5.1", "version": "4.5.2",
"description": "The lodash method `_.method` exported as a module.", "description": "The lodash method `_.method` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",

View File

@@ -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. 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'); 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.

View File

@@ -29,7 +29,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** /**
* Used to match `RegExp` * 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; var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -101,6 +101,7 @@ function isHostObject(value) {
/** Used for built-in method references. */ /** Used for built-in method references. */
var arrayProto = Array.prototype, var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype; objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */ /** Used to detect overreaching core-js shims. */
@@ -113,14 +114,14 @@ var maskSrcKey = (function() {
}()); }());
/** Used to resolve the decompiled source of functions. */ /** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString; var funcToString = funcProto.toString;
/** Used to check objects for own properties. */ /** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty; var hasOwnProperty = objectProto.hasOwnProperty;
/** /**
* Used to resolve the * 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. * of values.
*/ */
var objectToString = objectProto.toString; 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. * Gets the index at which the `key` is found in `array` of key-value pairs.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {*} key The key to search for. * @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`. * @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 * **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache` * function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the * 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`. * method interface of `delete`, `get`, `has`, and `set`.
* *
* @static * @static
@@ -842,7 +843,7 @@ memoize.Cache = MapCache;
/** /**
* Performs a * 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. * comparison between two values to determine if they are equivalent.
* *
* @static * @static
@@ -920,15 +921,14 @@ var isArray = Array.isArray;
*/ */
function isFunction(value) { function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array and weak map constructors, // in Safari 8-9 which returns 'object' for typed array and other constructors.
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : ''; var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag; return tag == funcTag || tag == genTag;
} }
/** /**
* Checks if `value` is the * 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('')`) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* *
* @static * @static

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.methodof", "name": "lodash.methodof",
"version": "4.5.1", "version": "4.5.2",
"description": "The lodash method `_.methodOf` exported as a module.", "description": "The lodash method `_.methodOf` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",

View File

@@ -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. 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'); 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.

View File

@@ -29,7 +29,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** /**
* Used to match `RegExp` * 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; var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -81,6 +81,7 @@ function isHostObject(value) {
/** Used for built-in method references. */ /** Used for built-in method references. */
var arrayProto = Array.prototype, var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype; objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */ /** Used to detect overreaching core-js shims. */
@@ -93,14 +94,14 @@ var maskSrcKey = (function() {
}()); }());
/** Used to resolve the decompiled source of functions. */ /** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString; var funcToString = funcProto.toString;
/** Used to check objects for own properties. */ /** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty; var hasOwnProperty = objectProto.hasOwnProperty;
/** /**
* Used to resolve the * 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. * of values.
*/ */
var objectToString = objectProto.toString; 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. * Gets the index at which the `key` is found in `array` of key-value pairs.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {*} key The key to search for. * @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`. * @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 * **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache` * function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the * 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`. * method interface of `delete`, `get`, `has`, and `set`.
* *
* @static * @static
@@ -689,7 +690,7 @@ memoize.Cache = MapCache;
/** /**
* Performs a * 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. * comparison between two values to determine if they are equivalent.
* *
* @static * @static
@@ -767,15 +768,14 @@ var isArray = Array.isArray;
*/ */
function isFunction(value) { function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array and weak map constructors, // in Safari 8-9 which returns 'object' for typed array and other constructors.
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : ''; var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag; return tag == funcTag || tag == genTag;
} }
/** /**
* Checks if `value` is the * 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('')`) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* *
* @static * @static

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.result", "name": "lodash.result",
"version": "4.5.1", "version": "4.5.2",
"description": "The lodash method `_.result` exported as a module.", "description": "The lodash method `_.result` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",

View File

@@ -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. 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'); 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.

View File

@@ -27,7 +27,7 @@ var reLeadingDot = /^\./,
/** /**
* Used to match `RegExp` * 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; var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -99,6 +99,7 @@ function isHostObject(value) {
/** Used for built-in method references. */ /** Used for built-in method references. */
var arrayProto = Array.prototype, var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype; objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */ /** Used to detect overreaching core-js shims. */
@@ -111,14 +112,14 @@ var maskSrcKey = (function() {
}()); }());
/** Used to resolve the decompiled source of functions. */ /** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString; var funcToString = funcProto.toString;
/** Used to check objects for own properties. */ /** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty; var hasOwnProperty = objectProto.hasOwnProperty;
/** /**
* Used to resolve the * 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. * of values.
*/ */
var objectToString = objectProto.toString; 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. * Gets the index at which the `key` is found in `array` of key-value pairs.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {*} key The key to search for. * @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`. * @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 * **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache` * function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the * 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`. * method interface of `delete`, `get`, `has`, and `set`.
* *
* @static * @static
@@ -694,7 +695,7 @@ memoize.Cache = MapCache;
/** /**
* Performs a * 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. * comparison between two values to determine if they are equivalent.
* *
* @static * @static
@@ -772,15 +773,14 @@ var isArray = Array.isArray;
*/ */
function isFunction(value) { function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array and weak map constructors, // in Safari 8-9 which returns 'object' for typed array and other constructors.
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : ''; var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag; return tag == funcTag || tag == genTag;
} }
/** /**
* Checks if `value` is the * 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('')`) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* *
* @static * @static

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.topath", "name": "lodash.topath",
"version": "4.5.1", "version": "4.5.2",
"description": "The lodash method `_.toPath` exported as a module.", "description": "The lodash method `_.toPath` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",

View File

@@ -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. 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'); 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.

View File

@@ -29,7 +29,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
/** /**
* Used to match `RegExp` * 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; var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
@@ -79,22 +79,9 @@ function isHostObject(value) {
return result; 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. */ /** Used for built-in method references. */
var arrayProto = Array.prototype, var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype; objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */ /** Used to detect overreaching core-js shims. */
@@ -107,14 +94,14 @@ var maskSrcKey = (function() {
}()); }());
/** Used to resolve the decompiled source of functions. */ /** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString; var funcToString = funcProto.toString;
/** Used to check objects for own properties. */ /** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty; var hasOwnProperty = objectProto.hasOwnProperty;
/** /**
* Used to resolve the * 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. * of values.
*/ */
var objectToString = objectProto.toString; var objectToString = objectProto.toString;
@@ -129,9 +116,6 @@ var reIsNative = RegExp('^' +
var Symbol = root.Symbol, var Symbol = root.Symbol,
splice = arrayProto.splice; 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. */ /* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map'), var Map = getNative(root, 'Map'),
nativeCreate = getNative(Object, 'create'); 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. * Gets the index at which the `key` is found in `array` of key-value pairs.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {*} key The key to search for. * @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`. * @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; 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. * The base implementation of `_.isNative` without bad shim checks.
* *
@@ -578,7 +545,7 @@ function baseUnset(object, path) {
object = parent(object, path); object = parent(object, path);
var key = toKey(last(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; 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. * 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 * **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache` * function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the * 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`. * method interface of `delete`, `get`, `has`, and `set`.
* *
* @static * @static
@@ -829,7 +787,7 @@ memoize.Cache = MapCache;
/** /**
* Performs a * 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. * comparison between two values to determine if they are equivalent.
* *
* @static * @static
@@ -907,15 +865,14 @@ var isArray = Array.isArray;
*/ */
function isFunction(value) { function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array and weak map constructors, // in Safari 8-9 which returns 'object' for typed array and other constructors.
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : ''; var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag; return tag == funcTag || tag == genTag;
} }
/** /**
* Checks if `value` is the * 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('')`) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* *
* @static * @static

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.unset", "name": "lodash.unset",
"version": "4.5.1", "version": "4.5.2",
"description": "The lodash method `_.unset` exported as a module.", "description": "The lodash method `_.unset` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",