Compare commits

...

1 Commits

Author SHA1 Message Date
John-David Dalton
3dd9766d86 Bump to v4.8.0. 2019-07-09 21:54:49 -07:00
31 changed files with 471 additions and 501 deletions

View File

@@ -1,4 +1,4 @@
# lodash v4.7.1 # lodash v4.8.0
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,4 +1,4 @@
# lodash._stringtopath v4.7.1 # lodash._stringtopath v4.8.0
The internal [lodash](https://lodash.com/) function `stringToPath` exported as a [Node.js](https://nodejs.org/) module. The internal [lodash](https://lodash.com/) function `stringToPath` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var stringToPath = require('lodash._stringtopath'); var stringToPath = require('lodash._stringtopath');
``` ```
See the [package source](https://github.com/lodash/lodash/blob/4.7.1-npm-packages/lodash._stringtopath) for more details. See the [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash._stringtopath) for more details.

View File

@@ -1,11 +1,12 @@
/** /**
* lodash 4.7.1 (Custom Build) <https://lodash.com/> * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./` * Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/> * Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license> * 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 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/ */
var baseToString = require('lodash._basetostring');
/** Used as the `TypeError` message for "Functions" methods. */ /** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function'; var FUNC_ERROR_TEXT = 'Expected a function';
@@ -13,13 +14,9 @@ var FUNC_ERROR_TEXT = 'Expected a function';
/** 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 as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** `Object#toString` result references. */ /** `Object#toString` result references. */
var funcTag = '[object Function]', var funcTag = '[object Function]',
genTag = '[object GeneratorFunction]', genTag = '[object GeneratorFunction]';
symbolTag = '[object Symbol]';
/** Used to match property names within property paths. */ /** Used to match property names within property paths. */
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g;
@@ -128,95 +125,236 @@ var reIsNative = RegExp('^' +
); );
/** Built-in value references. */ /** Built-in value references. */
var Symbol = root.Symbol, var splice = arrayProto.splice;
splice = arrayProto.splice;
/* 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');
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
/** /**
* Creates a hash object. * Creates a hash object.
* *
* @private * @private
* @constructor * @constructor
* @returns {Object} Returns the new hash object. * @param {Array} [entries] The key-value pairs to cache.
*/ */
function Hash() {} function Hash(entries) {
var index = -1,
length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
/**
* Removes all key-value entries from the hash.
*
* @private
* @name clear
* @memberOf Hash
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
}
/** /**
* Removes `key` and its value from the hash. * Removes `key` and its value from the hash.
* *
* @private * @private
* @name delete
* @memberOf Hash
* @param {Object} hash The hash to modify. * @param {Object} hash The hash 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`.
*/ */
function hashDelete(hash, key) { function hashDelete(key) {
return hashHas(hash, key) && delete hash[key]; return this.has(key) && delete this.__data__[key];
} }
/** /**
* Gets the hash value for `key`. * Gets the hash value for `key`.
* *
* @private * @private
* @param {Object} hash The hash to query. * @name get
* @memberOf Hash
* @param {string} key The key of the value to get. * @param {string} key The key of the value to get.
* @returns {*} Returns the entry value. * @returns {*} Returns the entry value.
*/ */
function hashGet(hash, key) { function hashGet(key) {
var data = this.__data__;
if (nativeCreate) { if (nativeCreate) {
var result = hash[key]; var result = data[key];
return result === HASH_UNDEFINED ? undefined : result; return result === HASH_UNDEFINED ? undefined : result;
} }
return hasOwnProperty.call(hash, key) ? hash[key] : undefined; return hasOwnProperty.call(data, key) ? data[key] : undefined;
} }
/** /**
* Checks if a hash value for `key` exists. * Checks if a hash value for `key` exists.
* *
* @private * @private
* @param {Object} hash The hash to query. * @name has
* @memberOf Hash
* @param {string} key The key of the entry to check. * @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/ */
function hashHas(hash, key) { function hashHas(key) {
return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key); var data = this.__data__;
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
} }
/** /**
* Sets the hash `key` to `value`. * Sets the hash `key` to `value`.
* *
* @private * @private
* @param {Object} hash The hash to modify. * @name set
* @memberOf Hash
* @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 hash instance.
*/ */
function hashSet(hash, key, value) { function hashSet(key, value) {
hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; var data = this.__data__;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
} }
// Avoid inheriting from `Object.prototype` when possible. // Add methods to `Hash`.
Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto; Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
/**
* Removes all key-value entries from the list cache.
*
* @private
* @name clear
* @memberOf ListCache
*/
function listCacheClear() {
this.__data__ = [];
}
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
return true;
}
/**
* Gets the list cache value for `key`.
*
* @private
* @name get
* @memberOf ListCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
/**
* Checks if a list cache value for `key` exists.
*
* @private
* @name has
* @memberOf ListCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
/**
* Sets the list cache `key` to `value`.
*
* @private
* @name set
* @memberOf ListCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the list cache instance.
*/
function listCacheSet(key, value) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
/** /**
* Creates a map cache object to store key-value pairs. * Creates a map cache object to store key-value pairs.
* *
* @private * @private
* @constructor * @constructor
* @param {Array} [values] The values to cache. * @param {Array} [entries] The key-value pairs to cache.
*/ */
function MapCache(values) { function MapCache(entries) {
var index = -1, var index = -1,
length = values ? values.length : 0; length = entries ? entries.length : 0;
this.clear(); this.clear();
while (++index < length) { while (++index < length) {
var entry = values[index]; var entry = entries[index];
this.set(entry[0], entry[1]); this.set(entry[0], entry[1]);
} }
} }
@@ -228,10 +366,10 @@ function MapCache(values) {
* @name clear * @name clear
* @memberOf MapCache * @memberOf MapCache
*/ */
function mapClear() { function mapCacheClear() {
this.__data__ = { this.__data__ = {
'hash': new Hash, 'hash': new Hash,
'map': Map ? new Map : [], 'map': new (Map || ListCache),
'string': new Hash 'string': new Hash
}; };
} }
@@ -245,12 +383,8 @@ function mapClear() {
* @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`.
*/ */
function mapDelete(key) { function mapCacheDelete(key) {
var data = this.__data__; return getMapData(this, key)['delete'](key);
if (isKeyable(key)) {
return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
}
return Map ? data.map['delete'](key) : assocDelete(data.map, key);
} }
/** /**
@@ -262,12 +396,8 @@ function mapDelete(key) {
* @param {string} key The key of the value to get. * @param {string} key The key of the value to get.
* @returns {*} Returns the entry value. * @returns {*} Returns the entry value.
*/ */
function mapGet(key) { function mapCacheGet(key) {
var data = this.__data__; return getMapData(this, key).get(key);
if (isKeyable(key)) {
return hashGet(typeof key == 'string' ? data.string : data.hash, key);
}
return Map ? data.map.get(key) : assocGet(data.map, key);
} }
/** /**
@@ -279,12 +409,8 @@ function mapGet(key) {
* @param {string} key The key of the entry to check. * @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/ */
function mapHas(key) { function mapCacheHas(key) {
var data = this.__data__; return getMapData(this, key).has(key);
if (isKeyable(key)) {
return hashHas(typeof key == 'string' ? data.string : data.hash, key);
}
return Map ? data.map.has(key) : assocHas(data.map, key);
} }
/** /**
@@ -297,71 +423,17 @@ function mapHas(key) {
* @param {*} value The value to set. * @param {*} value The value to set.
* @returns {Object} Returns the map cache instance. * @returns {Object} Returns the map cache instance.
*/ */
function mapSet(key, value) { function mapCacheSet(key, value) {
var data = this.__data__; getMapData(this, key).set(key, value);
if (isKeyable(key)) {
hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
} else if (Map) {
data.map.set(key, value);
} else {
assocSet(data.map, key, value);
}
return this; return this;
} }
// Add methods to `MapCache`. // Add methods to `MapCache`.
MapCache.prototype.clear = mapClear; MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapDelete; MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapGet; MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapHas; MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapSet; MapCache.prototype.set = mapCacheSet;
/**
* Removes `key` and its value from the associative array.
*
* @private
* @param {Array} array The array to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function assocDelete(array, key) {
var index = assocIndexOf(array, key);
if (index < 0) {
return false;
}
var lastIndex = array.length - 1;
if (index == lastIndex) {
array.pop();
} else {
splice.call(array, index, 1);
}
return true;
}
/**
* Gets the associative array value for `key`.
*
* @private
* @param {Array} array The array to query.
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function assocGet(array, key) {
var index = assocIndexOf(array, key);
return index < 0 ? undefined : array[index][1];
}
/**
* Checks if an associative array value for `key` exists.
*
* @private
* @param {Array} array The array to query.
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function assocHas(array, key) {
return assocIndexOf(array, key) > -1;
}
/** /**
* 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.
@@ -382,20 +454,18 @@ function assocIndexOf(array, key) {
} }
/** /**
* Sets the associative array `key` to `value`. * Gets the data for `map`.
* *
* @private * @private
* @param {Array} array The array to modify. * @param {Object} map The map to query.
* @param {string} key The key of the value to set. * @param {string} key The reference key.
* @param {*} value The value to set. * @returns {*} Returns the map data.
*/ */
function assocSet(array, key, value) { function getMapData(map, key) {
var index = assocIndexOf(array, key); var data = map.__data__;
if (index < 0) { return isKeyable(key)
array.push([key, value]); ? data[typeof key == 'string' ? 'string' : 'hash']
} else { : data.map;
array[index][1] = value;
}
} }
/** /**
@@ -420,8 +490,9 @@ function getNative(object, key) {
*/ */
function isKeyable(value) { function isKeyable(value) {
var type = typeof value; var type = typeof value;
return type == 'number' || type == 'boolean' || return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
(type == 'string' && value != '__proto__') || value == null; ? (value !== '__proto__')
: (value === null);
} }
/** /**
@@ -477,7 +548,7 @@ function toSource(func) {
* @category Function * @category Function
* @param {Function} func The function to have its output memoized. * @param {Function} func The function to have its output memoized.
* @param {Function} [resolver] The function to resolve the cache key. * @param {Function} [resolver] The function to resolve the cache key.
* @returns {Function} Returns the new memoizing function. * @returns {Function} Returns the new memoized function.
* @example * @example
* *
* var object = { 'a': 1, 'b': 2 }; * var object = { 'a': 1, 'b': 2 };
@@ -617,34 +688,6 @@ function isObject(value) {
return !!value && (type == 'object' || type == 'function'); return !!value && (type == 'object' || type == 'function');
} }
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return !!value && typeof value == 'object';
}
/** /**
* Checks if `value` is a native function. * Checks if `value` is a native function.
* *
@@ -671,29 +714,6 @@ function isNative(value) {
return pattern.test(toSource(value)); return pattern.test(toSource(value));
} }
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
/** /**
* Converts `value` to a string. An empty string is returned for `null` * Converts `value` to a string. An empty string is returned for `null`
* and `undefined` values. The sign of `-0` is preserved. * and `undefined` values. The sign of `-0` is preserved.
@@ -716,18 +736,7 @@ function isSymbol(value) {
* // => '1,2,3' * // => '1,2,3'
*/ */
function toString(value) { function toString(value) {
// Exit early for strings to avoid a performance hit in some environments. return value == null ? '' : baseToString(value);
if (typeof value == 'string') {
return value;
}
if (value == null) {
return '';
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
} }
module.exports = stringToPath; module.exports = stringToPath;

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash._stringtopath", "name": "lodash._stringtopath",
"version": "4.7.1", "version": "4.8.0",
"description": "The internal lodash function `stringToPath` exported as a module.", "description": "The internal lodash function `stringToPath` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",
@@ -12,5 +12,8 @@
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)" "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
], ],
"repository": "lodash/lodash", "repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basetostring": "~4.12.0"
}
} }

View File

@@ -1,4 +1,4 @@
# lodash.differenceby v4.7.1 # lodash.differenceby v4.8.0
The [lodash](https://lodash.com/) method `_.differenceBy` exported as a [Node.js](https://nodejs.org/) module. The [lodash](https://lodash.com/) method `_.differenceBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var differenceBy = require('lodash.differenceby'); var differenceBy = require('lodash.differenceby');
``` ```
See the [documentation](https://lodash.com/docs#differenceBy) or [package source](https://github.com/lodash/lodash/blob/4.7.1-npm-packages/lodash.differenceby) for more details. See the [documentation](https://lodash.com/docs#differenceBy) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.differenceby) 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;
@@ -147,7 +147,7 @@ function apply(func, thisArg, args) {
* specifying an index to search from. * specifying an index to search from.
* *
* @private * @private
* @param {Array} [array] The array to search. * @param {Array} [array] The array to inspect.
* @param {*} target The value to search for. * @param {*} target The value to search for.
* @returns {boolean} Returns `true` if `target` is found, else `false`. * @returns {boolean} Returns `true` if `target` is found, else `false`.
*/ */
@@ -160,7 +160,7 @@ function arrayIncludes(array, value) {
* This function is like `arrayIncludes` except that it accepts a comparator. * This function is like `arrayIncludes` except that it accepts a comparator.
* *
* @private * @private
* @param {Array} [array] The array to search. * @param {Array} [array] The array to inspect.
* @param {*} target The value to search for. * @param {*} target The value to search for.
* @param {Function} comparator The comparator invoked per element. * @param {Function} comparator The comparator invoked per element.
* @returns {boolean} Returns `true` if `target` is found, else `false`. * @returns {boolean} Returns `true` if `target` is found, else `false`.
@@ -243,7 +243,7 @@ function arraySome(array, predicate) {
* support for iteratee shorthands. * support for iteratee shorthands.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {Function} predicate The function invoked per iteration. * @param {Function} predicate The function invoked per iteration.
* @param {number} fromIndex The index to search from. * @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left. * @param {boolean} [fromRight] Specify iterating from right to left.
@@ -265,7 +265,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) {
* The base implementation of `_.indexOf` without `fromIndex` bounds checks. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {*} value The value to search for. * @param {*} value The value to search for.
* @param {number} fromIndex The index to search from. * @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`. * @returns {number} Returns the index of the matched value, else `-1`.
@@ -402,7 +402,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.
@@ -434,6 +434,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. */
@@ -446,14 +447,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;
@@ -472,8 +473,7 @@ var Symbol = root.Symbol,
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
/* 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. */
@@ -942,11 +942,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`.
*/ */
@@ -1081,23 +1108,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.
* *
@@ -1300,14 +1310,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`.
@@ -1542,7 +1562,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 + '');
@@ -1604,7 +1624,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;
} }
} }
@@ -1655,19 +1675,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`.
* *
@@ -1716,15 +1723,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`.
* *
@@ -1735,7 +1733,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) ||
@@ -1787,24 +1785,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;
} }
/** /**
@@ -2043,7 +2024,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
@@ -2102,7 +2083,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
@@ -2155,7 +2136,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);
} }
@@ -2211,7 +2192,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);
} }
/** /**
@@ -2262,8 +2243,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;
} }
@@ -2271,16 +2251,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);
@@ -2302,7 +2281,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
@@ -2358,28 +2337,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.
* *
@@ -2510,7 +2467,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
@@ -2535,23 +2492,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.differenceby", "name": "lodash.differenceby",
"version": "4.7.1", "version": "4.8.0",
"description": "The lodash method `_.differenceBy` exported as a module.", "description": "The lodash method `_.differenceBy` 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.divide v4.7.0 # lodash.divide v4.8.0
The [lodash](https://lodash.com/) method `_.divide` exported as a [Node.js](https://nodejs.org/) module. The [lodash](https://lodash.com/) method `_.divide` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var divide = require('lodash.divide'); var divide = require('lodash.divide');
``` ```
See the [documentation](https://lodash.com/docs#divide) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.divide) for more details. See the [documentation](https://lodash.com/docs#divide) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.divide) for more details.

View File

@@ -1,11 +1,13 @@
/** /**
* lodash 4.7.0 (Custom Build) <https://lodash.com/> * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./` * Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/> * Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license> * 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 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/ */
var baseToNumber = require('lodash._basetonumber'),
baseToString = require('lodash._basetostring');
/** /**
* Creates a function that performs a mathematical operation on two values. * Creates a function that performs a mathematical operation on two values.
@@ -24,7 +26,17 @@ function createMathOperation(operator) {
result = value; result = value;
} }
if (other !== undefined) { if (other !== undefined) {
result = result === undefined ? other : operator(result, other); if (result === undefined) {
return other;
}
if (typeof value == 'string' || typeof other == 'string') {
value = baseToString(value);
other = baseToString(other);
} else {
value = baseToNumber(value);
other = baseToNumber(other);
}
result = operator(value, other);
} }
return result; return result;
}; };

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.divide", "name": "lodash.divide",
"version": "4.7.0", "version": "4.8.0",
"description": "The lodash method `_.divide` exported as a module.", "description": "The lodash method `_.divide` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",
@@ -13,5 +13,9 @@
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)" "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
], ],
"repository": "lodash/lodash", "repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basetonumber": "~4.12.0",
"lodash._basetostring": "~4.12.0"
}
} }

View File

@@ -1,4 +1,4 @@
# lodash.flatmapdeep v4.7.0 # lodash.flatmapdeep v4.8.0
The [lodash](https://lodash.com/) method `_.flatMapDeep` exported as a [Node.js](https://nodejs.org/) module. The [lodash](https://lodash.com/) method `_.flatMapDeep` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var flatMapDeep = require('lodash.flatmapdeep'); var flatMapDeep = require('lodash.flatmapdeep');
``` ```
See the [documentation](https://lodash.com/docs#flatMapDeep) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.flatmapdeep) for more details. See the [documentation](https://lodash.com/docs#flatMapDeep) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.flatmapdeep) for more details.

View File

@@ -1,5 +1,5 @@
/** /**
* lodash 4.7.0 (Custom Build) <https://lodash.com/> * lodash 4.8.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./` * Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/> * Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.flatmapdeep", "name": "lodash.flatmapdeep",
"version": "4.7.0", "version": "4.8.0",
"description": "The lodash method `_.flatMapDeep` exported as a module.", "description": "The lodash method `_.flatMapDeep` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",
@@ -15,7 +15,7 @@
"repository": "lodash/lodash", "repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": { "dependencies": {
"lodash._baseflatten": "~4.1.0", "lodash._baseflatten": "~4.2.0",
"lodash.map": "^4.0.0" "lodash.map": "^4.0.0"
} }
} }

View File

@@ -1,4 +1,4 @@
# lodash.flatmapdepth v4.7.0 # lodash.flatmapdepth v4.8.0
The [lodash](https://lodash.com/) method `_.flatMapDepth` exported as a [Node.js](https://nodejs.org/) module. The [lodash](https://lodash.com/) method `_.flatMapDepth` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var flatMapDepth = require('lodash.flatmapdepth'); var flatMapDepth = require('lodash.flatmapdepth');
``` ```
See the [documentation](https://lodash.com/docs#flatMapDepth) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.flatmapdepth) for more details. See the [documentation](https://lodash.com/docs#flatMapDepth) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.flatmapdepth) for more details.

View File

@@ -1,5 +1,5 @@
/** /**
* lodash 4.7.0 (Custom Build) <https://lodash.com/> * lodash 4.8.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./` * Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/> * Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
@@ -38,7 +38,8 @@ var freeParseInt = parseInt;
var objectProto = Object.prototype; var objectProto = Object.prototype;
/** /**
* 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;
@@ -97,8 +98,9 @@ function isFunction(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 _

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.flatmapdepth", "name": "lodash.flatmapdepth",
"version": "4.7.0", "version": "4.8.0",
"description": "The lodash method `_.flatMapDepth` exported as a module.", "description": "The lodash method `_.flatMapDepth` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",
@@ -15,7 +15,7 @@
"repository": "lodash/lodash", "repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": { "dependencies": {
"lodash._baseflatten": "~4.1.0", "lodash._baseflatten": "~4.2.0",
"lodash.map": "^4.0.0" "lodash.map": "^4.0.0"
} }
} }

View File

@@ -1,4 +1,4 @@
# lodash.meanby v4.7.0 # lodash.meanby v4.8.0
The [lodash](https://lodash.com/) method `_.meanBy` exported as a [Node.js](https://nodejs.org/) module. The [lodash](https://lodash.com/) method `_.meanBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var meanBy = require('lodash.meanby'); var meanBy = require('lodash.meanby');
``` ```
See the [documentation](https://lodash.com/docs#meanBy) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.meanby) for more details. See the [documentation](https://lodash.com/docs#meanBy) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.meanby) for more details.

View File

@@ -1,5 +1,5 @@
/** /**
* lodash 4.7.0 (Custom Build) <https://lodash.com/> * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./` * Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/> * Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.meanby", "name": "lodash.meanby",
"version": "4.7.0", "version": "4.8.0",
"description": "The lodash method `_.meanBy` exported as a module.", "description": "The lodash method `_.meanBy` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",
@@ -15,6 +15,6 @@
"repository": "lodash/lodash", "repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": { "dependencies": {
"lodash._baseiteratee": "~4.6.0" "lodash._baseiteratee": "~4.7.0"
} }
} }

View File

@@ -1,4 +1,4 @@
# lodash.multiply v4.7.0 # lodash.multiply v4.8.0
The [lodash](https://lodash.com/) method `_.multiply` exported as a [Node.js](https://nodejs.org/) module. The [lodash](https://lodash.com/) method `_.multiply` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var multiply = require('lodash.multiply'); var multiply = require('lodash.multiply');
``` ```
See the [documentation](https://lodash.com/docs#multiply) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.multiply) for more details. See the [documentation](https://lodash.com/docs#multiply) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.multiply) for more details.

View File

@@ -1,11 +1,13 @@
/** /**
* lodash 4.7.0 (Custom Build) <https://lodash.com/> * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./` * Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/> * Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license> * 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 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/ */
var baseToNumber = require('lodash._basetonumber'),
baseToString = require('lodash._basetostring');
/** /**
* Creates a function that performs a mathematical operation on two values. * Creates a function that performs a mathematical operation on two values.
@@ -24,7 +26,17 @@ function createMathOperation(operator) {
result = value; result = value;
} }
if (other !== undefined) { if (other !== undefined) {
result = result === undefined ? other : operator(result, other); if (result === undefined) {
return other;
}
if (typeof value == 'string' || typeof other == 'string') {
value = baseToString(value);
other = baseToString(other);
} else {
value = baseToNumber(value);
other = baseToNumber(other);
}
result = operator(value, other);
} }
return result; return result;
}; };

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.multiply", "name": "lodash.multiply",
"version": "4.7.0", "version": "4.8.0",
"description": "The lodash method `_.multiply` exported as a module.", "description": "The lodash method `_.multiply` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",
@@ -13,5 +13,9 @@
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)" "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
], ],
"repository": "lodash/lodash", "repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._basetonumber": "~4.12.0",
"lodash._basetostring": "~4.12.0"
}
} }

View File

@@ -1,4 +1,4 @@
# lodash.unionby v4.7.1 # lodash.unionby v4.8.0
The [lodash](https://lodash.com/) method `_.unionBy` exported as a [Node.js](https://nodejs.org/) module. The [lodash](https://lodash.com/) method `_.unionBy` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var unionBy = require('lodash.unionby'); var unionBy = require('lodash.unionby');
``` ```
See the [documentation](https://lodash.com/docs#unionBy) or [package source](https://github.com/lodash/lodash/blob/4.7.1-npm-packages/lodash.unionby) for more details. See the [documentation](https://lodash.com/docs#unionBy) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.unionby) 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;
@@ -147,7 +147,7 @@ function apply(func, thisArg, args) {
* specifying an index to search from. * specifying an index to search from.
* *
* @private * @private
* @param {Array} [array] The array to search. * @param {Array} [array] The array to inspect.
* @param {*} target The value to search for. * @param {*} target The value to search for.
* @returns {boolean} Returns `true` if `target` is found, else `false`. * @returns {boolean} Returns `true` if `target` is found, else `false`.
*/ */
@@ -160,7 +160,7 @@ function arrayIncludes(array, value) {
* This function is like `arrayIncludes` except that it accepts a comparator. * This function is like `arrayIncludes` except that it accepts a comparator.
* *
* @private * @private
* @param {Array} [array] The array to search. * @param {Array} [array] The array to inspect.
* @param {*} target The value to search for. * @param {*} target The value to search for.
* @param {Function} comparator The comparator invoked per element. * @param {Function} comparator The comparator invoked per element.
* @returns {boolean} Returns `true` if `target` is found, else `false`. * @returns {boolean} Returns `true` if `target` is found, else `false`.
@@ -223,7 +223,7 @@ function arraySome(array, predicate) {
* support for iteratee shorthands. * support for iteratee shorthands.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {Function} predicate The function invoked per iteration. * @param {Function} predicate The function invoked per iteration.
* @param {number} fromIndex The index to search from. * @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left. * @param {boolean} [fromRight] Specify iterating from right to left.
@@ -245,7 +245,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) {
* The base implementation of `_.indexOf` without `fromIndex` bounds checks. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
* *
* @private * @private
* @param {Array} array The array to search. * @param {Array} array The array to inspect.
* @param {*} value The value to search for. * @param {*} value The value to search for.
* @param {number} fromIndex The index to search from. * @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`. * @returns {number} Returns the index of the matched value, else `-1`.
@@ -382,7 +382,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.
@@ -414,6 +414,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. */
@@ -426,14 +427,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;
@@ -452,8 +453,7 @@ var Symbol = root.Symbol,
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
/* 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. */
@@ -922,11 +922,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`.
*/ */
@@ -1005,23 +1032,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.
* *
@@ -1224,14 +1234,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`.
@@ -1538,7 +1558,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 + '');
@@ -1600,7 +1620,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;
} }
} }
@@ -1651,19 +1671,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`.
* *
@@ -1712,15 +1719,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`.
* *
@@ -1731,7 +1729,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) ||
@@ -1783,24 +1781,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;
} }
/** /**
@@ -2036,7 +2017,7 @@ var unionBy = baseRest(function(arrays) {
* **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
@@ -2095,7 +2076,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
@@ -2148,7 +2129,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);
} }
@@ -2204,7 +2185,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);
} }
/** /**
@@ -2255,8 +2236,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;
} }
@@ -2264,16 +2244,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);
@@ -2295,7 +2274,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
@@ -2351,28 +2330,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.
* *
@@ -2503,7 +2460,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
@@ -2528,23 +2485,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.unionby", "name": "lodash.unionby",
"version": "4.7.1", "version": "4.8.0",
"description": "The lodash method `_.unionBy` exported as a module.", "description": "The lodash method `_.unionBy` 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.update v4.7.0 # lodash.update v4.8.0
The [lodash](https://lodash.com/) method `_.update` exported as a [Node.js](https://nodejs.org/) module. The [lodash](https://lodash.com/) method `_.update` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var update = require('lodash.update'); var update = require('lodash.update');
``` ```
See the [documentation](https://lodash.com/docs#update) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.update) for more details. See the [documentation](https://lodash.com/docs#update) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.update) for more details.

View File

@@ -1,5 +1,5 @@
/** /**
* lodash 4.7.0 (Custom Build) <https://lodash.com/> * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./` * Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/> * Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
@@ -9,6 +9,9 @@
var baseSet = require('lodash._baseset'), var baseSet = require('lodash._baseset'),
stringToPath = require('lodash._stringtopath'); stringToPath = require('lodash._stringtopath');
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** `Object#toString` result references. */ /** `Object#toString` result references. */
var symbolTag = '[object Symbol]'; var symbolTag = '[object Symbol]';
@@ -41,7 +44,7 @@ function baseGet(object, path) {
length = path.length; length = path.length;
while (object != null && index < length) { while (object != null && index < length) {
object = object[path[index++]]; object = object[toKey(path[index++])];
} }
return (index && index == length) ? object : undefined; return (index && index == length) ? object : undefined;
} }
@@ -91,13 +94,31 @@ function castPath(value) {
* @returns {boolean} Returns `true` if `value` is a property name, else `false`. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/ */
function isKey(value, object) { function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value; var type = typeof value;
if (type == 'number' || type == 'symbol') { if (type == 'number' || type == 'symbol' || type == 'boolean' ||
value == null || isSymbol(value)) {
return true; return true;
} }
return !isArray(value) && return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(isSymbol(value) || reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object));
(object != null && value in Object(object))); }
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
} }
/** /**

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.update", "name": "lodash.update",
"version": "4.7.0", "version": "4.8.0",
"description": "The lodash method `_.update` exported as a module.", "description": "The lodash method `_.update` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",
@@ -16,6 +16,6 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": { "dependencies": {
"lodash._baseset": "~4.2.0", "lodash._baseset": "~4.2.0",
"lodash._stringtopath": "~4.7.0" "lodash._stringtopath": "~4.8.0"
} }
} }

View File

@@ -1,4 +1,4 @@
# lodash.updatewith v4.7.0 # lodash.updatewith v4.8.0
The [lodash](https://lodash.com/) method `_.updateWith` exported as a [Node.js](https://nodejs.org/) module. The [lodash](https://lodash.com/) method `_.updateWith` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var updateWith = require('lodash.updatewith'); var updateWith = require('lodash.updatewith');
``` ```
See the [documentation](https://lodash.com/docs#updateWith) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.updatewith) for more details. See the [documentation](https://lodash.com/docs#updateWith) or [package source](https://github.com/lodash/lodash/blob/4.8.0-npm-packages/lodash.updatewith) for more details.

View File

@@ -1,5 +1,5 @@
/** /**
* lodash 4.7.0 (Custom Build) <https://lodash.com/> * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./` * Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/> * Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
@@ -9,6 +9,9 @@
var baseSet = require('lodash._baseset'), var baseSet = require('lodash._baseset'),
stringToPath = require('lodash._stringtopath'); stringToPath = require('lodash._stringtopath');
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** `Object#toString` result references. */ /** `Object#toString` result references. */
var symbolTag = '[object Symbol]'; var symbolTag = '[object Symbol]';
@@ -41,7 +44,7 @@ function baseGet(object, path) {
length = path.length; length = path.length;
while (object != null && index < length) { while (object != null && index < length) {
object = object[path[index++]]; object = object[toKey(path[index++])];
} }
return (index && index == length) ? object : undefined; return (index && index == length) ? object : undefined;
} }
@@ -91,13 +94,31 @@ function castPath(value) {
* @returns {boolean} Returns `true` if `value` is a property name, else `false`. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/ */
function isKey(value, object) { function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value; var type = typeof value;
if (type == 'number' || type == 'symbol') { if (type == 'number' || type == 'symbol' || type == 'boolean' ||
value == null || isSymbol(value)) {
return true; return true;
} }
return !isArray(value) && return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(isSymbol(value) || reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object));
(object != null && value in Object(object))); }
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
} }
/** /**

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.updatewith", "name": "lodash.updatewith",
"version": "4.7.0", "version": "4.8.0",
"description": "The lodash method `_.updateWith` exported as a module.", "description": "The lodash method `_.updateWith` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",
@@ -16,6 +16,6 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": { "dependencies": {
"lodash._baseset": "~4.2.0", "lodash._baseset": "~4.2.0",
"lodash._stringtopath": "~4.7.0" "lodash._stringtopath": "~4.8.0"
} }
} }