mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
Compare commits
5 Commits
4.6.2-npm-
...
4.9.0-npm-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
265d0f01e3 | ||
|
|
dc5c8eda06 | ||
|
|
3dd9766d86 | ||
|
|
3772ae8eab | ||
|
|
1d324e473f |
@@ -1,4 +1,4 @@
|
||||
# lodash v4.6.2
|
||||
# lodash v4.9.0
|
||||
|
||||
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# lodash._baseiteratee v4.6.2
|
||||
|
||||
The internal [lodash](https://lodash.com/) function `baseIteratee` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash._baseiteratee
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var baseIteratee = require('lodash._baseiteratee');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/4.6.2-npm-packages/lodash._baseiteratee) for more details.
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.differenceby v4.6.0
|
||||
# lodash.differenceby v4.8.0
|
||||
|
||||
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');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#differenceBy) or [package source](https://github.com/lodash/lodash/blob/4.6.0-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.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.differenceby",
|
||||
"version": "4.6.0",
|
||||
"version": "4.8.0",
|
||||
"description": "The lodash method `_.differenceBy` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -13,11 +13,5 @@
|
||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||
],
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basedifference": "~4.5.0",
|
||||
"lodash._baseflatten": "~4.2.0",
|
||||
"lodash._baseiteratee": "~4.7.0",
|
||||
"lodash.rest": "^4.0.0"
|
||||
}
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||
}
|
||||
|
||||
18
lodash.divide/README.md
Normal file
18
lodash.divide/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# lodash.divide v4.9.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.divide` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.divide
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var divide = require('lodash.divide');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#divide) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.divide) for more details.
|
||||
184
lodash.divide/index.js
Normal file
184
lodash.divide/index.js
Normal file
@@ -0,0 +1,184 @@
|
||||
/**
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* 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>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0,
|
||||
NAN = 0 / 0;
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var symbolTag = '[object Symbol]';
|
||||
|
||||
/** Detect free variable `global` from Node.js. */
|
||||
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
||||
|
||||
/** Detect free variable `self`. */
|
||||
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
||||
|
||||
/** Used as a reference to the global object. */
|
||||
var root = freeGlobal || freeSelf || Function('return this')();
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/** Built-in value references. */
|
||||
var Symbol = root.Symbol;
|
||||
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
||||
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.toNumber` which doesn't ensure correct
|
||||
* conversions of binary, hexadecimal, or octal string values.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to process.
|
||||
* @returns {number} Returns the number.
|
||||
*/
|
||||
function baseToNumber(value) {
|
||||
if (typeof value == 'number') {
|
||||
return value;
|
||||
}
|
||||
if (isSymbol(value)) {
|
||||
return NAN;
|
||||
}
|
||||
return +value;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.toString` which doesn't convert nullish
|
||||
* values to empty strings.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to process.
|
||||
* @returns {string} Returns the string.
|
||||
*/
|
||||
function baseToString(value) {
|
||||
// Exit early for strings to avoid a performance hit in some environments.
|
||||
if (typeof value == 'string') {
|
||||
return value;
|
||||
}
|
||||
if (isSymbol(value)) {
|
||||
return symbolToString ? symbolToString.call(value) : '';
|
||||
}
|
||||
var result = (value + '');
|
||||
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that performs a mathematical operation on two values.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} operator The function to perform the operation.
|
||||
* @param {number} [defaultValue] The value used for `undefined` arguments.
|
||||
* @returns {Function} Returns the new mathematical operation function.
|
||||
*/
|
||||
function createMathOperation(operator, defaultValue) {
|
||||
return function(value, other) {
|
||||
var result;
|
||||
if (value === undefined && other === undefined) {
|
||||
return defaultValue;
|
||||
}
|
||||
if (value !== undefined) {
|
||||
result = value;
|
||||
}
|
||||
if (other !== undefined) {
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 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 a symbol, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isSymbol(Symbol.iterator);
|
||||
* // => true
|
||||
*
|
||||
* _.isSymbol('abc');
|
||||
* // => false
|
||||
*/
|
||||
function isSymbol(value) {
|
||||
return typeof value == 'symbol' ||
|
||||
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Divide two numbers.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.7.0
|
||||
* @category Math
|
||||
* @param {number} dividend The first number in a division.
|
||||
* @param {number} divisor The second number in a division.
|
||||
* @returns {number} Returns the quotient.
|
||||
* @example
|
||||
*
|
||||
* _.divide(6, 4);
|
||||
* // => 1.5
|
||||
*/
|
||||
var divide = createMathOperation(function(dividend, divisor) {
|
||||
return dividend / divisor;
|
||||
}, 1);
|
||||
|
||||
module.exports = divide;
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"name": "lodash._baseiteratee",
|
||||
"version": "4.6.2",
|
||||
"description": "The internal lodash function `baseIteratee` exported as a module.",
|
||||
"name": "lodash.divide",
|
||||
"version": "4.9.0",
|
||||
"description": "The lodash method `_.divide` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash-modularized, divide",
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
@@ -12,8 +13,5 @@
|
||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||
],
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._stringtopath": "~4.7.0"
|
||||
}
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.findlastkey v4.6.1
|
||||
# lodash.findlastkey v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.findLastKey` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var findLastKey = require('lodash.findlastkey');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#findLastKey) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.findlastkey) for more details.
|
||||
See the [documentation](https://lodash.com/docs#findLastKey) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.findlastkey) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -150,7 +150,7 @@ function arraySome(array, predicate) {
|
||||
* using `eachFunc`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object} collection The collection to search.
|
||||
* @param {Array|Object} collection The collection to inspect.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @param {Function} eachFunc The function to iterate over `collection`.
|
||||
* @returns {*} Returns the found element or its key, else `undefined`.
|
||||
@@ -260,7 +260,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -292,6 +292,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -304,14 +305,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -329,8 +330,7 @@ var Symbol = root.Symbol,
|
||||
splice = arrayProto.splice;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys;
|
||||
var nativeKeys = overArg(Object.keys, Object);
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var DataView = getNative(root, 'DataView'),
|
||||
@@ -798,11 +798,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -871,23 +898,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1090,14 +1100,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1327,7 +1347,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1389,7 +1409,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1440,19 +1460,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1501,15 +1508,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1520,7 +1518,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1572,24 +1570,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1762,7 +1743,7 @@ function toSource(func) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -1821,7 +1802,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -1874,7 +1855,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -1930,7 +1911,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1981,8 +1962,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -1990,16 +1970,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2021,7 +2000,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2077,28 +2056,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2173,7 +2130,7 @@ function toString(value) {
|
||||
* @memberOf _
|
||||
* @since 2.0.0
|
||||
* @category Object
|
||||
* @param {Object} object The object to search.
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
||||
* @returns {string|undefined} Returns the key of the matched element,
|
||||
* else `undefined`.
|
||||
@@ -2268,7 +2225,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2293,23 +2250,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.findlastkey",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.findLastKey` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
47
lodash.flatmapdeep/LICENSE
Normal file
47
lodash.flatmapdeep/LICENSE
Normal file
@@ -0,0 +1,47 @@
|
||||
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights 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 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.
|
||||
18
lodash.flatmapdeep/README.md
Normal file
18
lodash.flatmapdeep/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# lodash.flatmapdeep v4.9.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.flatMapDeep` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.flatmapdeep
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var flatMapDeep = require('lodash.flatmapdeep');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#flatMapDeep) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.flatmapdeep) for more details.
|
||||
2508
lodash.flatmapdeep/index.js
Normal file
2508
lodash.flatmapdeep/index.js
Normal file
File diff suppressed because it is too large
Load Diff
17
lodash.flatmapdeep/package.json
Normal file
17
lodash.flatmapdeep/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "lodash.flatmapdeep",
|
||||
"version": "4.9.0",
|
||||
"description": "The lodash method `_.flatMapDeep` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash-modularized, flatmapdeep",
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||
],
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||
}
|
||||
47
lodash.flatmapdepth/LICENSE
Normal file
47
lodash.flatmapdepth/LICENSE
Normal file
@@ -0,0 +1,47 @@
|
||||
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights 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 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.
|
||||
18
lodash.flatmapdepth/README.md
Normal file
18
lodash.flatmapdepth/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# lodash.flatmapdepth v4.9.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.flatMapDepth` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.flatmapdepth
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var flatMapDepth = require('lodash.flatmapdepth');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#flatMapDepth) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.flatmapdepth) for more details.
|
||||
2639
lodash.flatmapdepth/index.js
Normal file
2639
lodash.flatmapdepth/index.js
Normal file
File diff suppressed because it is too large
Load Diff
17
lodash.flatmapdepth/package.json
Normal file
17
lodash.flatmapdepth/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "lodash.flatmapdepth",
|
||||
"version": "4.9.0",
|
||||
"description": "The lodash method `_.flatMapDepth` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash-modularized, flatmapdepth",
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||
],
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.flattendepth v4.6.0
|
||||
# lodash.flattendepth v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.flattenDepth` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var flattenDepth = require('lodash.flattendepth');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#flattenDepth) or [package source](https://github.com/lodash/lodash/blob/4.6.0-npm-packages/lodash.flattendepth) for more details.
|
||||
See the [documentation](https://lodash.com/docs#flattenDepth) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.flattendepth) for more details.
|
||||
|
||||
@@ -62,19 +62,6 @@ function arrayPush(array, values) {
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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];
|
||||
};
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
@@ -83,7 +70,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -127,19 +114,6 @@ function baseFlatten(array, depth, predicate, isStrict, 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');
|
||||
|
||||
/**
|
||||
* Checks if `value` is a flattenable `arguments` object or array.
|
||||
*
|
||||
@@ -200,7 +174,7 @@ function flattenDepth(array, depth) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -256,7 +230,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -307,8 +281,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -316,16 +289,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -347,7 +319,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -464,7 +436,7 @@ function toFinite(value) {
|
||||
* Converts `value` to an integer.
|
||||
*
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
|
||||
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -524,7 +496,7 @@ function toNumber(value) {
|
||||
return NAN;
|
||||
}
|
||||
if (isObject(value)) {
|
||||
var other = isFunction(value.valueOf) ? value.valueOf() : value;
|
||||
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
||||
value = isObject(other) ? (other + '') : other;
|
||||
}
|
||||
if (typeof value != 'string') {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.flattendepth",
|
||||
"version": "4.6.0",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.flattenDepth` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.intersectionby v4.6.1
|
||||
# lodash.intersectionby v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.intersectionBy` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var intersectionBy = require('lodash.intersectionby');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#intersectionBy) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.intersectionby) for more details.
|
||||
See the [documentation](https://lodash.com/docs#intersectionBy) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.intersectionby) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -147,7 +147,7 @@ function apply(func, thisArg, args) {
|
||||
* specifying an index to search from.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to search.
|
||||
* @param {Array} [array] The array to inspect.
|
||||
* @param {*} target The value to search for.
|
||||
* @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.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to search.
|
||||
* @param {Array} [array] The array to inspect.
|
||||
* @param {*} target The value to search for.
|
||||
* @param {Function} comparator The comparator invoked per element.
|
||||
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||||
@@ -224,7 +224,7 @@ function arraySome(array, predicate) {
|
||||
* support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||
@@ -246,7 +246,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
||||
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} value The value to search for.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
@@ -383,7 +383,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -415,6 +415,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -427,14 +428,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -452,8 +453,7 @@ var Symbol = root.Symbol,
|
||||
splice = arrayProto.splice;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys,
|
||||
var nativeKeys = overArg(Object.keys, Object),
|
||||
nativeMax = Math.max,
|
||||
nativeMin = Math.min;
|
||||
|
||||
@@ -923,11 +923,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -972,23 +999,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1254,14 +1264,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1507,7 +1527,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1569,7 +1589,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1620,19 +1640,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1681,15 +1688,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1700,7 +1698,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1752,24 +1750,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1997,7 +1978,7 @@ function last(array) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -2056,7 +2037,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -2109,7 +2090,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -2165,7 +2146,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2216,8 +2197,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2225,16 +2205,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2256,7 +2235,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2312,28 +2291,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2464,7 +2421,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2489,23 +2446,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.intersectionby",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.intersectionBy` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.invertby v4.6.1
|
||||
# lodash.invertby v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.invertBy` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var invertBy = require('lodash.invertby');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#invertBy) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.invertby) for more details.
|
||||
See the [documentation](https://lodash.com/docs#invertBy) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.invertby) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -238,7 +238,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -270,6 +270,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -282,14 +283,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -307,8 +308,7 @@ var Symbol = root.Symbol,
|
||||
splice = arrayProto.splice;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys;
|
||||
var nativeKeys = overArg(Object.keys, Object);
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var DataView = getNative(root, 'DataView'),
|
||||
@@ -776,11 +776,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -850,23 +877,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1087,14 +1097,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1338,7 +1358,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1400,7 +1420,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1451,19 +1471,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1512,15 +1519,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1531,7 +1529,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1583,24 +1581,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1773,7 +1754,7 @@ function toSource(func) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -1832,7 +1813,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -1885,7 +1866,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -1941,7 +1922,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1992,8 +1973,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2001,16 +1981,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2032,7 +2011,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2088,28 +2067,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2274,7 +2231,7 @@ var invertBy = createInverter(function(result, value, key) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2299,23 +2256,7 @@ var invertBy = createInverter(function(result, value, key) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.invertby",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.invertBy` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.iteratee v4.6.1
|
||||
# lodash.iteratee v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.iteratee` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var iteratee = require('lodash.iteratee');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#iteratee) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.iteratee) for more details.
|
||||
See the [documentation](https://lodash.com/docs#iteratee) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.iteratee) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -350,7 +350,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -382,6 +382,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -394,14 +395,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -416,15 +417,15 @@ var reIsNative = RegExp('^' +
|
||||
var Buffer = moduleExports ? root.Buffer : undefined,
|
||||
Symbol = root.Symbol,
|
||||
Uint8Array = root.Uint8Array,
|
||||
getPrototype = overArg(Object.getPrototypeOf, Object),
|
||||
objectCreate = Object.create,
|
||||
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
||||
splice = arrayProto.splice;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeGetSymbols = Object.getOwnPropertySymbols,
|
||||
var nativeGetSymbols = Object.getOwnPropertySymbols,
|
||||
nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
|
||||
nativeKeys = Object.keys;
|
||||
nativeKeys = overArg(Object.keys, Object);
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var DataView = getNative(root, 'DataView'),
|
||||
@@ -892,9 +893,36 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
||||
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @private
|
||||
@@ -914,7 +942,7 @@ function assignValue(object, key, value) {
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -1075,23 +1103,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1294,14 +1305,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1674,7 +1695,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1736,7 +1757,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1798,19 +1819,6 @@ function getAllKeys(object) {
|
||||
return baseGetAllKeys(object, keys, getSymbols);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
@@ -1859,15 +1867,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Creates an array of the own enumerable symbol properties of `object`.
|
||||
*
|
||||
@@ -1887,7 +1886,7 @@ var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArra
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1939,7 +1938,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2023,23 +2022,6 @@ function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like index.
|
||||
*
|
||||
@@ -2210,7 +2192,7 @@ function toSource(func) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -2269,7 +2251,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -2322,7 +2304,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -2378,7 +2360,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2448,8 +2430,7 @@ var isBuffer = nativeIsBuffer || stubFalse;
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2457,16 +2438,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2488,7 +2468,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2544,28 +2524,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2696,7 +2654,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2721,23 +2679,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.iteratee",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.iteratee` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.matchesproperty v4.6.1
|
||||
# lodash.matchesproperty v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.matchesProperty` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var matchesProperty = require('lodash.matchesproperty');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#matchesProperty) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.matchesproperty) for more details.
|
||||
See the [documentation](https://lodash.com/docs#matchesProperty) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.matchesproperty) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -256,19 +256,6 @@ function arraySome(array, predicate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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];
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.times` without support for iteratee shorthands
|
||||
* or max array length checks.
|
||||
@@ -350,7 +337,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -382,6 +369,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -394,14 +382,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -416,15 +404,15 @@ var reIsNative = RegExp('^' +
|
||||
var Buffer = moduleExports ? root.Buffer : undefined,
|
||||
Symbol = root.Symbol,
|
||||
Uint8Array = root.Uint8Array,
|
||||
getPrototype = overArg(Object.getPrototypeOf, Object),
|
||||
objectCreate = Object.create,
|
||||
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
||||
splice = arrayProto.splice;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeGetSymbols = Object.getOwnPropertySymbols,
|
||||
var nativeGetSymbols = Object.getOwnPropertySymbols,
|
||||
nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
|
||||
nativeKeys = Object.keys;
|
||||
nativeKeys = overArg(Object.keys, Object);
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var DataView = getNative(root, 'DataView'),
|
||||
@@ -892,9 +880,36 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
||||
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @private
|
||||
@@ -914,7 +929,7 @@ function assignValue(object, key, value) {
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -1075,23 +1090,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1216,14 +1214,24 @@ function baseIsTypedArray(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
|
||||
@@ -1566,7 +1574,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1628,7 +1636,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1690,19 +1698,6 @@ function getAllKeys(object) {
|
||||
return baseGetAllKeys(object, keys, getSymbols);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
@@ -1731,15 +1726,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Creates an array of the own enumerable symbol properties of `object`.
|
||||
*
|
||||
@@ -1759,7 +1745,7 @@ var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArra
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1811,7 +1797,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1895,23 +1881,6 @@ function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like index.
|
||||
*
|
||||
@@ -2082,7 +2051,7 @@ function toSource(func) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -2141,7 +2110,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -2194,7 +2163,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -2250,7 +2219,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2320,8 +2289,7 @@ var isBuffer = nativeIsBuffer || stubFalse;
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2329,16 +2297,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2360,7 +2327,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2416,28 +2383,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2568,7 +2513,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2593,23 +2538,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2617,7 +2546,9 @@ function keys(object) {
|
||||
* value at `path` of a given object to `srcValue`, returning `true` if the
|
||||
* object value is equivalent, else `false`.
|
||||
*
|
||||
* **Note:** This method supports comparing the same values as `_.isEqual`.
|
||||
* **Note:** Partial comparisons will match empty array and empty object
|
||||
* `srcValue` values against any array or object value, respectively. See
|
||||
* `_.isEqual` for a list of supported value comparisons.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.matchesproperty",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.matchesProperty` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
47
lodash.meanby/LICENSE
Normal file
47
lodash.meanby/LICENSE
Normal file
@@ -0,0 +1,47 @@
|
||||
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights 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 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.
|
||||
18
lodash.meanby/README.md
Normal file
18
lodash.meanby/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# lodash.meanby v4.9.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.meanBy` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.meanby
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var meanBy = require('lodash.meanby');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#meanBy) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.meanby) for more details.
|
||||
@@ -6,11 +6,13 @@
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
var stringToPath = require('lodash._stringtopath');
|
||||
|
||||
/** Used as the size to enable large array optimizations. */
|
||||
var LARGE_ARRAY_SIZE = 200;
|
||||
|
||||
/** Used as the `TypeError` message for "Functions" methods. */
|
||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
|
||||
/** Used to stand-in for `undefined` hash values. */
|
||||
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
||||
|
||||
@@ -20,7 +22,8 @@ var UNORDERED_COMPARE_FLAG = 1,
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0,
|
||||
MAX_SAFE_INTEGER = 9007199254740991;
|
||||
MAX_SAFE_INTEGER = 9007199254740991,
|
||||
NAN = 0 / 0;
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var argsTag = '[object Arguments]',
|
||||
@@ -54,7 +57,8 @@ var arrayBufferTag = '[object ArrayBuffer]',
|
||||
|
||||
/** Used to match property names within property paths. */
|
||||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
reIsPlainProp = /^\w*$/;
|
||||
reIsPlainProp = /^\w*$/,
|
||||
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g;
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
@@ -62,6 +66,9 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
/** Used to match backslashes in property paths. */
|
||||
var reEscapeChar = /\\(\\)?/g;
|
||||
|
||||
/** Used to detect host constructors (Safari). */
|
||||
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||||
|
||||
@@ -84,77 +91,50 @@ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
||||
typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
||||
typedArrayTags[weakMapTag] = false;
|
||||
|
||||
/** Used to determine if values are of the language type `Object`. */
|
||||
var objectTypes = {
|
||||
'function': true,
|
||||
'object': true
|
||||
};
|
||||
|
||||
/** Detect free variable `exports`. */
|
||||
var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
|
||||
? exports
|
||||
: undefined;
|
||||
|
||||
/** Detect free variable `module`. */
|
||||
var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
|
||||
? module
|
||||
: undefined;
|
||||
|
||||
/** Detect free variable `global` from Node.js. */
|
||||
var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
|
||||
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
||||
|
||||
/** Detect free variable `self`. */
|
||||
var freeSelf = checkGlobal(objectTypes[typeof self] && self);
|
||||
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
||||
|
||||
/** Detect free variable `window`. */
|
||||
var freeWindow = checkGlobal(objectTypes[typeof window] && window);
|
||||
/** Used as a reference to the global object. */
|
||||
var root = freeGlobal || freeSelf || Function('return this')();
|
||||
|
||||
/** Detect `this` as the global object. */
|
||||
var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
|
||||
/** Detect free variable `exports`. */
|
||||
var freeExports = freeGlobal && typeof exports == 'object' && exports;
|
||||
|
||||
/**
|
||||
* Used as a reference to the global object.
|
||||
*
|
||||
* The `this` value is used if it's the global object to avoid Greasemonkey's
|
||||
* restricted `window` object, otherwise the `window` object is used.
|
||||
*/
|
||||
var root = freeGlobal ||
|
||||
((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
|
||||
freeSelf || thisGlobal || Function('return this')();
|
||||
/** Detect free variable `module`. */
|
||||
var freeModule = freeExports && typeof module == 'object' && module;
|
||||
|
||||
/**
|
||||
* A specialized version of `_.map` for arrays without support for iteratee
|
||||
* shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Array} Returns the new mapped array.
|
||||
*/
|
||||
function arrayMap(array, iteratee) {
|
||||
var index = -1,
|
||||
length = array.length,
|
||||
result = Array(length);
|
||||
/** Detect the popular CommonJS extension `module.exports`. */
|
||||
var moduleExports = freeModule && freeModule.exports === freeExports;
|
||||
|
||||
while (++index < length) {
|
||||
result[index] = iteratee(array[index], index, array);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/** Detect free variable `process` from Node.js. */
|
||||
var freeProcess = moduleExports && freeGlobal.process;
|
||||
|
||||
/** Used to access faster Node.js helpers. */
|
||||
var nodeUtil = (function() {
|
||||
try {
|
||||
return freeProcess && freeProcess.binding('util');
|
||||
} catch (e) {}
|
||||
}());
|
||||
|
||||
/* Node.js helper references. */
|
||||
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
||||
|
||||
/**
|
||||
* A specialized version of `_.some` for arrays without support for iteratee
|
||||
* shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Array} [array] The array to iterate over.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
||||
* else `false`.
|
||||
*/
|
||||
function arraySome(array, predicate) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
length = array ? array.length : 0;
|
||||
|
||||
while (++index < length) {
|
||||
if (predicate(array[index], index, array)) {
|
||||
@@ -164,6 +144,56 @@ function arraySome(array, predicate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.mean` and `_.meanBy` without support for
|
||||
* iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {number} Returns the mean.
|
||||
*/
|
||||
function baseMean(array, iteratee) {
|
||||
var length = array ? array.length : 0;
|
||||
return length ? (baseSum(array, iteratee) / length) : NAN;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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];
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.sum` and `_.sumBy` without support for
|
||||
* iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {number} Returns the sum.
|
||||
*/
|
||||
function baseSum(array, iteratee) {
|
||||
var result,
|
||||
index = -1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
var current = iteratee(array[index]);
|
||||
if (current !== undefined) {
|
||||
result = result === undefined ? current : (result + current);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.times` without support for iteratee shorthands
|
||||
* or max array length checks.
|
||||
@@ -184,29 +214,28 @@ function baseTimes(n, iteratee) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
|
||||
* of key-value pairs for `object` corresponding to the property names of `props`.
|
||||
* The base implementation of `_.unary` without support for storing metadata.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @param {Array} props The property names to get values for.
|
||||
* @returns {Object} Returns the key-value pairs.
|
||||
* @param {Function} func The function to cap arguments for.
|
||||
* @returns {Function} Returns the new capped function.
|
||||
*/
|
||||
function baseToPairs(object, props) {
|
||||
return arrayMap(props, function(key) {
|
||||
return [key, object[key]];
|
||||
});
|
||||
function baseUnary(func) {
|
||||
return function(value) {
|
||||
return func(value);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a global object.
|
||||
* Gets the value at `key` of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {null|Object} Returns `value` if it's a global object, else `null`.
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {string} key The key of the property to get.
|
||||
* @returns {*} Returns the property value.
|
||||
*/
|
||||
function checkGlobal(value) {
|
||||
return (value && value.Object === Object) ? value : null;
|
||||
function getValue(object, key) {
|
||||
return object == null ? undefined : object[key];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -245,6 +274,20 @@ function mapToArray(map) {
|
||||
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));
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `set` to an array of its values.
|
||||
*
|
||||
@@ -262,27 +305,19 @@ function setToArray(set) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `set` to its value-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to convert.
|
||||
* @returns {Array} Returns the value-value pairs.
|
||||
*/
|
||||
function setToPairs(set) {
|
||||
var index = -1,
|
||||
result = Array(set.size);
|
||||
|
||||
set.forEach(function(value) {
|
||||
result[++index] = [value, value];
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
var coreJsData = root['__core-js_shared__'];
|
||||
|
||||
/** Used to detect methods masquerading as native. */
|
||||
var maskSrcKey = (function() {
|
||||
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
||||
return uid ? ('Symbol(src)_1.' + uid) : '';
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
|
||||
@@ -329,7 +364,8 @@ var dataViewCtorString = toSource(DataView),
|
||||
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
||||
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
||||
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
|
||||
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
||||
|
||||
/**
|
||||
* Creates a hash object.
|
||||
@@ -758,8 +794,13 @@ function stackHas(key) {
|
||||
*/
|
||||
function stackSet(key, value) {
|
||||
var cache = this.__data__;
|
||||
if (cache instanceof ListCache && cache.__data__.length == LARGE_ARRAY_SIZE) {
|
||||
cache = this.__data__ = new MapCache(cache.__data__);
|
||||
if (cache instanceof ListCache) {
|
||||
var pairs = cache.__data__;
|
||||
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
||||
pairs.push([key, value]);
|
||||
return this;
|
||||
}
|
||||
cache = this.__data__ = new MapCache(pairs);
|
||||
}
|
||||
cache.set(key, value);
|
||||
return this;
|
||||
@@ -810,11 +851,22 @@ function baseGet(object, path) {
|
||||
return (index && index == length) ? object : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `getTag`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {string} Returns the `toStringTag`.
|
||||
*/
|
||||
function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
@@ -822,20 +874,21 @@ 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 hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null);
|
||||
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.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @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 baseHasIn(object, key) {
|
||||
return key in Object(object);
|
||||
return object != null && key in Object(object);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -975,6 +1028,34 @@ function baseIsMatch(object, source, matchData, customizer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.isNative` without bad shim checks.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a native function,
|
||||
* else `false`.
|
||||
*/
|
||||
function baseIsNative(value) {
|
||||
if (!isObject(value) || isMasked(value)) {
|
||||
return false;
|
||||
}
|
||||
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
||||
return pattern.test(toSource(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
||||
*/
|
||||
function baseIsTypedArray(value) {
|
||||
return isObjectLike(value) &&
|
||||
isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.iteratee`.
|
||||
*
|
||||
@@ -1007,9 +1088,7 @@ function baseIteratee(value) {
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function baseKeys(object) {
|
||||
return nativeKeys(Object(object));
|
||||
}
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1048,19 +1127,6 @@ function baseMatchesProperty(path, srcValue) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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];
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `baseProperty` which supports deep paths.
|
||||
*
|
||||
@@ -1074,6 +1140,26 @@ function basePropertyDeep(path) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.toString` which doesn't convert nullish
|
||||
* values to empty strings.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to process.
|
||||
* @returns {string} Returns the string.
|
||||
*/
|
||||
function baseToString(value) {
|
||||
// Exit early for strings to avoid a performance hit in some environments.
|
||||
if (typeof value == 'string') {
|
||||
return value;
|
||||
}
|
||||
if (isSymbol(value)) {
|
||||
return symbolToString ? symbolToString.call(value) : '';
|
||||
}
|
||||
var result = (value + '');
|
||||
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `value` to a path array if it's not one.
|
||||
*
|
||||
@@ -1085,26 +1171,6 @@ function castPath(value) {
|
||||
return isArray(value) ? value : stringToPath(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a `_.toPairs` or `_.toPairsIn` function.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} keysFunc The function to get the keys of a given object.
|
||||
* @returns {Function} Returns the new pairs function.
|
||||
*/
|
||||
function createToPairs(keysFunc) {
|
||||
return function(object) {
|
||||
var tag = getTag(object);
|
||||
if (tag == mapTag) {
|
||||
return mapToArray(object);
|
||||
}
|
||||
if (tag == setTag) {
|
||||
return setToPairs(object);
|
||||
}
|
||||
return baseToPairs(object, keysFunc(object));
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `baseIsEqualDeep` for arrays with support for
|
||||
* partial deep comparisons.
|
||||
@@ -1129,7 +1195,7 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
|
||||
}
|
||||
// Assume cyclic values are equal.
|
||||
var stacked = stack.get(array);
|
||||
if (stacked) {
|
||||
if (stacked && stack.get(other)) {
|
||||
return stacked == other;
|
||||
}
|
||||
var index = -1,
|
||||
@@ -1137,6 +1203,7 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
|
||||
seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
|
||||
|
||||
stack.set(array, other);
|
||||
stack.set(other, array);
|
||||
|
||||
// Ignore non-index properties.
|
||||
while (++index < arrLength) {
|
||||
@@ -1215,18 +1282,14 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
|
||||
case boolTag:
|
||||
case dateTag:
|
||||
// Coerce dates and booleans to numbers, dates to milliseconds and
|
||||
// booleans to `1` or `0` treating invalid dates coerced to `NaN` as
|
||||
// not equal.
|
||||
return +object == +other;
|
||||
case numberTag:
|
||||
// Coerce booleans to `1` or `0` and dates to milliseconds.
|
||||
// Invalid dates are coerced to `NaN`.
|
||||
return eq(+object, +other);
|
||||
|
||||
case errorTag:
|
||||
return object.name == other.name && object.message == other.message;
|
||||
|
||||
case numberTag:
|
||||
// Treat `NaN` vs. `NaN` as equal.
|
||||
return (object != +object) ? other != +other : object == +other;
|
||||
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
@@ -1250,10 +1313,12 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
return stacked == other;
|
||||
}
|
||||
bitmask |= UNORDERED_COMPARE_FLAG;
|
||||
stack.set(object, other);
|
||||
|
||||
// Recursively compare objects (susceptible to call stack limits).
|
||||
return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
|
||||
stack.set(object, other);
|
||||
var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
|
||||
stack['delete'](object);
|
||||
return result;
|
||||
|
||||
case symbolTag:
|
||||
if (symbolValueOf) {
|
||||
@@ -1296,11 +1361,12 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
}
|
||||
// Assume cyclic values are equal.
|
||||
var stacked = stack.get(object);
|
||||
if (stacked) {
|
||||
if (stacked && stack.get(other)) {
|
||||
return stacked == other;
|
||||
}
|
||||
var result = true;
|
||||
stack.set(object, other);
|
||||
stack.set(other, object);
|
||||
|
||||
var skipCtor = isPartial;
|
||||
while (++index < objLength) {
|
||||
@@ -1375,11 +1441,14 @@ function getMapData(map, key) {
|
||||
* @returns {Array} Returns the match data of `object`.
|
||||
*/
|
||||
function getMatchData(object) {
|
||||
var result = toPairs(object),
|
||||
var result = keys(object),
|
||||
length = result.length;
|
||||
|
||||
while (length--) {
|
||||
result[length][2] = isStrictComparable(result[length][1]);
|
||||
var key = result[length],
|
||||
value = object[key];
|
||||
|
||||
result[length] = [key, value, isStrictComparable(value)];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1393,8 +1462,8 @@ function getMatchData(object) {
|
||||
* @returns {*} Returns the function if it's native, else `undefined`.
|
||||
*/
|
||||
function getNative(object, key) {
|
||||
var value = object[key];
|
||||
return isNative(value) ? value : undefined;
|
||||
var value = getValue(object, key);
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1404,9 +1473,7 @@ function getNative(object, key) {
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
function getPrototype(value) {
|
||||
return nativeGetPrototype(Object(value));
|
||||
}
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
@@ -1415,9 +1482,7 @@ function getPrototype(value) {
|
||||
* @param {*} value The value to query.
|
||||
* @returns {string} Returns the `toStringTag`.
|
||||
*/
|
||||
function getTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
@@ -1542,6 +1607,17 @@ function isKeyable(value) {
|
||||
: (value === null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `func` has its source masked.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to check.
|
||||
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
||||
*/
|
||||
function isMasked(func) {
|
||||
return !!maskSrcKey && (maskSrcKey in func);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is likely a prototype object.
|
||||
*
|
||||
@@ -1587,6 +1663,21 @@ function matchesStrictComparable(key, srcValue) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `string` to a property path array.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to convert.
|
||||
* @returns {Array} Returns the property path array.
|
||||
*/
|
||||
var stringToPath = memoize(function(string) {
|
||||
var result = [];
|
||||
toString(string).replace(rePropName, function(match, number, quote, string) {
|
||||
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
|
||||
});
|
||||
return result;
|
||||
});
|
||||
|
||||
/**
|
||||
* Converts `value` to a string key if it's not a string or symbol.
|
||||
*
|
||||
@@ -1621,6 +1712,73 @@ function toSource(func) {
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that memoizes the result of `func`. If `resolver` is
|
||||
* provided, it determines the cache key for storing the result based on the
|
||||
* arguments provided to the memoized function. By default, the first argument
|
||||
* provided to the memoized function is used as the map cache key. The `func`
|
||||
* is invoked with the `this` binding of the memoized function.
|
||||
*
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Function
|
||||
* @param {Function} func The function to have its output memoized.
|
||||
* @param {Function} [resolver] The function to resolve the cache key.
|
||||
* @returns {Function} Returns the new memoized function.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'a': 1, 'b': 2 };
|
||||
* var other = { 'c': 3, 'd': 4 };
|
||||
*
|
||||
* var values = _.memoize(_.values);
|
||||
* values(object);
|
||||
* // => [1, 2]
|
||||
*
|
||||
* values(other);
|
||||
* // => [3, 4]
|
||||
*
|
||||
* object.a = 2;
|
||||
* values(object);
|
||||
* // => [1, 2]
|
||||
*
|
||||
* // Modify the result cache.
|
||||
* values.cache.set(object, ['a', 'b']);
|
||||
* values(object);
|
||||
* // => ['a', 'b']
|
||||
*
|
||||
* // Replace `_.memoize.Cache`.
|
||||
* _.memoize.Cache = WeakMap;
|
||||
*/
|
||||
function memoize(func, resolver) {
|
||||
if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
var memoized = function() {
|
||||
var args = arguments,
|
||||
key = resolver ? resolver.apply(this, args) : args[0],
|
||||
cache = memoized.cache;
|
||||
|
||||
if (cache.has(key)) {
|
||||
return cache.get(key);
|
||||
}
|
||||
var result = func.apply(this, args);
|
||||
memoized.cache = cache.set(key, result);
|
||||
return result;
|
||||
};
|
||||
memoized.cache = new (memoize.Cache || MapCache);
|
||||
return memoized;
|
||||
}
|
||||
|
||||
// Assign cache to `_.memoize`.
|
||||
memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
@@ -1635,8 +1793,8 @@ function toSource(func) {
|
||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'user': 'fred' };
|
||||
* var other = { 'user': 'fred' };
|
||||
* var object = { 'a': 1 };
|
||||
* var other = { 'a': 1 };
|
||||
*
|
||||
* _.eq(object, object);
|
||||
* // => true
|
||||
@@ -1665,7 +1823,7 @@ function eq(value, other) {
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified,
|
||||
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
@@ -1687,11 +1845,9 @@ function isArguments(value) {
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @type {Function}
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArray([1, 2, 3]);
|
||||
@@ -1774,8 +1930,7 @@ function isArrayLikeObject(value) {
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isFunction(_);
|
||||
@@ -1882,32 +2037,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a native function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a native function,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isNative(Array.prototype.push);
|
||||
* // => true
|
||||
*
|
||||
* _.isNative(_);
|
||||
* // => false
|
||||
*/
|
||||
function isNative(value) {
|
||||
if (!isObject(value)) {
|
||||
return false;
|
||||
}
|
||||
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
||||
return pattern.test(toSource(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
@@ -1916,8 +2045,7 @@ function isNative(value) {
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
@@ -1939,8 +2067,7 @@ function isString(value) {
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isSymbol(Symbol.iterator);
|
||||
@@ -1962,8 +2089,7 @@ function isSymbol(value) {
|
||||
* @since 3.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isTypedArray(new Uint8Array);
|
||||
@@ -1972,14 +2098,36 @@ function isSymbol(value) {
|
||||
* _.isTypedArray([]);
|
||||
* // => false
|
||||
*/
|
||||
function isTypedArray(value) {
|
||||
return isObjectLike(value) &&
|
||||
isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
|
||||
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
||||
|
||||
/**
|
||||
* Converts `value` to a string. An empty string is returned for `null`
|
||||
* and `undefined` values. The sign of `-0` is preserved.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to process.
|
||||
* @returns {string} Returns the string.
|
||||
* @example
|
||||
*
|
||||
* _.toString(null);
|
||||
* // => ''
|
||||
*
|
||||
* _.toString(-0);
|
||||
* // => '-0'
|
||||
*
|
||||
* _.toString([1, 2, 3]);
|
||||
* // => '1,2,3'
|
||||
*/
|
||||
function toString(value) {
|
||||
return value == null ? '' : baseToString(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value at `path` of `object`. If the resolved value is
|
||||
* `undefined`, the `defaultValue` is used in its place.
|
||||
* `undefined`, the `defaultValue` is returned in its place.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -2086,33 +2234,7 @@ function keys(object) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of own enumerable string keyed-value pairs for `object`
|
||||
* which can be consumed by `_.fromPairs`. If `object` is a map or set, its
|
||||
* entries are returned.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @alias entries
|
||||
* @category Object
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the key-value pairs.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.a = 1;
|
||||
* this.b = 2;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.c = 3;
|
||||
*
|
||||
* _.toPairs(new Foo);
|
||||
* // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
|
||||
*/
|
||||
var toPairs = createToPairs(keys);
|
||||
|
||||
/**
|
||||
* This method returns the first argument given to it.
|
||||
* This method returns the first argument it receives.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
@@ -2122,9 +2244,9 @@ var toPairs = createToPairs(keys);
|
||||
* @returns {*} Returns `value`.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'user': 'fred' };
|
||||
* var object = { 'a': 1 };
|
||||
*
|
||||
* _.identity(object) === object;
|
||||
* console.log(_.identity(object) === object);
|
||||
* // => true
|
||||
*/
|
||||
function identity(value) {
|
||||
@@ -2157,4 +2279,31 @@ function property(path) {
|
||||
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
||||
}
|
||||
|
||||
module.exports = baseIteratee;
|
||||
/**
|
||||
* This method is like `_.mean` except that it accepts `iteratee` which is
|
||||
* invoked for each element in `array` to generate the value to be averaged.
|
||||
* The iteratee is invoked with one argument: (value).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.7.0
|
||||
* @category Math
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
||||
* @returns {number} Returns the mean.
|
||||
* @example
|
||||
*
|
||||
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
|
||||
*
|
||||
* _.meanBy(objects, function(o) { return o.n; });
|
||||
* // => 5
|
||||
*
|
||||
* // The `_.property` iteratee shorthand.
|
||||
* _.meanBy(objects, 'n');
|
||||
* // => 5
|
||||
*/
|
||||
function meanBy(array, iteratee) {
|
||||
return baseMean(array, baseIteratee(iteratee, 2));
|
||||
}
|
||||
|
||||
module.exports = meanBy;
|
||||
17
lodash.meanby/package.json
Normal file
17
lodash.meanby/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "lodash.meanby",
|
||||
"version": "4.9.0",
|
||||
"description": "The lodash method `_.meanBy` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash-modularized, meanby",
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||
],
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||
}
|
||||
47
lodash.multiply/LICENSE
Normal file
47
lodash.multiply/LICENSE
Normal file
@@ -0,0 +1,47 @@
|
||||
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights 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 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.
|
||||
18
lodash.multiply/README.md
Normal file
18
lodash.multiply/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# lodash.multiply v4.9.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.multiply` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash.multiply
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var multiply = require('lodash.multiply');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#multiply) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.multiply) for more details.
|
||||
184
lodash.multiply/index.js
Normal file
184
lodash.multiply/index.js
Normal file
@@ -0,0 +1,184 @@
|
||||
/**
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* 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>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0,
|
||||
NAN = 0 / 0;
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var symbolTag = '[object Symbol]';
|
||||
|
||||
/** Detect free variable `global` from Node.js. */
|
||||
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
||||
|
||||
/** Detect free variable `self`. */
|
||||
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
||||
|
||||
/** Used as a reference to the global object. */
|
||||
var root = freeGlobal || freeSelf || Function('return this')();
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/** Built-in value references. */
|
||||
var Symbol = root.Symbol;
|
||||
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
||||
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.toNumber` which doesn't ensure correct
|
||||
* conversions of binary, hexadecimal, or octal string values.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to process.
|
||||
* @returns {number} Returns the number.
|
||||
*/
|
||||
function baseToNumber(value) {
|
||||
if (typeof value == 'number') {
|
||||
return value;
|
||||
}
|
||||
if (isSymbol(value)) {
|
||||
return NAN;
|
||||
}
|
||||
return +value;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.toString` which doesn't convert nullish
|
||||
* values to empty strings.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to process.
|
||||
* @returns {string} Returns the string.
|
||||
*/
|
||||
function baseToString(value) {
|
||||
// Exit early for strings to avoid a performance hit in some environments.
|
||||
if (typeof value == 'string') {
|
||||
return value;
|
||||
}
|
||||
if (isSymbol(value)) {
|
||||
return symbolToString ? symbolToString.call(value) : '';
|
||||
}
|
||||
var result = (value + '');
|
||||
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that performs a mathematical operation on two values.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} operator The function to perform the operation.
|
||||
* @param {number} [defaultValue] The value used for `undefined` arguments.
|
||||
* @returns {Function} Returns the new mathematical operation function.
|
||||
*/
|
||||
function createMathOperation(operator, defaultValue) {
|
||||
return function(value, other) {
|
||||
var result;
|
||||
if (value === undefined && other === undefined) {
|
||||
return defaultValue;
|
||||
}
|
||||
if (value !== undefined) {
|
||||
result = value;
|
||||
}
|
||||
if (other !== undefined) {
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 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 a symbol, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isSymbol(Symbol.iterator);
|
||||
* // => true
|
||||
*
|
||||
* _.isSymbol('abc');
|
||||
* // => false
|
||||
*/
|
||||
function isSymbol(value) {
|
||||
return typeof value == 'symbol' ||
|
||||
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiply two numbers.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.7.0
|
||||
* @category Math
|
||||
* @param {number} multiplier The first number in a multiplication.
|
||||
* @param {number} multiplicand The second number in a multiplication.
|
||||
* @returns {number} Returns the product.
|
||||
* @example
|
||||
*
|
||||
* _.multiply(6, 4);
|
||||
* // => 24
|
||||
*/
|
||||
var multiply = createMathOperation(function(multiplier, multiplicand) {
|
||||
return multiplier * multiplicand;
|
||||
}, 1);
|
||||
|
||||
module.exports = multiply;
|
||||
17
lodash.multiply/package.json
Normal file
17
lodash.multiply/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "lodash.multiply",
|
||||
"version": "4.9.0",
|
||||
"description": "The lodash method `_.multiply` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
"license": "MIT",
|
||||
"keywords": "lodash-modularized, multiply",
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||
],
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.over v4.6.1
|
||||
# lodash.over v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.over` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var over = require('lodash.over');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#over) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.over) for more details.
|
||||
See the [documentation](https://lodash.com/docs#over) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.over) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -297,7 +297,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -329,6 +329,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -341,14 +342,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -367,8 +368,7 @@ var Symbol = root.Symbol,
|
||||
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys,
|
||||
var nativeKeys = overArg(Object.keys, Object),
|
||||
nativeMax = Math.max;
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
@@ -837,11 +837,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -920,23 +947,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1139,14 +1149,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1403,7 +1423,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1465,7 +1485,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1516,19 +1536,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1577,15 +1584,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1596,7 +1594,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1648,24 +1646,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1850,7 +1831,7 @@ function toSource(func) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -1909,7 +1890,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -1962,7 +1943,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -2018,7 +1999,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2069,8 +2050,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2078,16 +2058,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2109,7 +2088,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2165,28 +2144,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2317,7 +2274,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2342,23 +2299,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.over",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.over` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.overargs v4.6.1
|
||||
# lodash.overargs v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.overArgs` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var overArgs = require('lodash.overargs');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#overArgs) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.overargs) for more details.
|
||||
See the [documentation](https://lodash.com/docs#overArgs) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.overargs) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -297,7 +297,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -329,6 +329,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -341,14 +342,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -367,8 +368,7 @@ var Symbol = root.Symbol,
|
||||
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys,
|
||||
var nativeKeys = overArg(Object.keys, Object),
|
||||
nativeMax = Math.max,
|
||||
nativeMin = Math.min;
|
||||
|
||||
@@ -838,11 +838,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -921,23 +948,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1140,14 +1150,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1382,7 +1402,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1444,7 +1464,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1495,19 +1515,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1556,15 +1563,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1575,7 +1573,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1627,24 +1625,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1829,7 +1810,7 @@ function toSource(func) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -1936,7 +1917,7 @@ var overArgs = baseRest(function(func, transforms) {
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -1989,7 +1970,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -2045,7 +2026,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2096,8 +2077,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2105,16 +2085,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2136,7 +2115,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2192,28 +2171,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2344,7 +2301,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2369,23 +2326,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.overargs",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.overArgs` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.overevery v4.6.1
|
||||
# lodash.overevery v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.overEvery` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var overEvery = require('lodash.overevery');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#overEvery) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.overevery) for more details.
|
||||
See the [documentation](https://lodash.com/docs#overEvery) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.overevery) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -319,7 +319,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -351,6 +351,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -363,14 +364,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -389,8 +390,7 @@ var Symbol = root.Symbol,
|
||||
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys,
|
||||
var nativeKeys = overArg(Object.keys, Object),
|
||||
nativeMax = Math.max;
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
@@ -859,11 +859,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -942,23 +969,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1161,14 +1171,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1425,7 +1445,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1487,7 +1507,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1538,19 +1558,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1599,15 +1606,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1618,7 +1616,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1670,24 +1668,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1872,7 +1853,7 @@ function toSource(func) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -1931,7 +1912,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -1984,7 +1965,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -2040,7 +2021,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2091,8 +2072,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2100,16 +2080,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2131,7 +2110,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2187,28 +2166,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2339,7 +2296,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2364,23 +2321,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.overevery",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.overEvery` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.oversome v4.6.1
|
||||
# lodash.oversome v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.overSome` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var overSome = require('lodash.oversome');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#overSome) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.oversome) for more details.
|
||||
See the [documentation](https://lodash.com/docs#overSome) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.oversome) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -297,7 +297,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -329,6 +329,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -341,14 +342,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -367,8 +368,7 @@ var Symbol = root.Symbol,
|
||||
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys,
|
||||
var nativeKeys = overArg(Object.keys, Object),
|
||||
nativeMax = Math.max;
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
@@ -837,11 +837,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -920,23 +947,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1139,14 +1149,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1403,7 +1423,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1465,7 +1485,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1516,19 +1536,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1577,15 +1584,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1596,7 +1594,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1648,24 +1646,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1850,7 +1831,7 @@ function toSource(func) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -1909,7 +1890,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -1962,7 +1943,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -2018,7 +1999,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2069,8 +2050,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2078,16 +2058,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2109,7 +2088,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2165,28 +2144,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2317,7 +2274,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2342,23 +2299,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.oversome",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.overSome` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.pullallby v4.6.1
|
||||
# lodash.pullallby v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.pullAllBy` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var pullAllBy = require('lodash.pullallby');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#pullAllBy) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.pullallby) for more details.
|
||||
See the [documentation](https://lodash.com/docs#pullAllBy) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.pullallby) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -169,7 +169,7 @@ function arraySome(array, predicate) {
|
||||
* support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||
@@ -191,7 +191,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
||||
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} value The value to search for.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
@@ -215,7 +215,7 @@ function baseIndexOf(array, value, fromIndex) {
|
||||
* This function is like `baseIndexOf` except that it accepts a comparator.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} value The value to search for.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @param {Function} comparator The comparator invoked per element.
|
||||
@@ -338,7 +338,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -370,6 +370,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -382,14 +383,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -407,8 +408,7 @@ var Symbol = root.Symbol,
|
||||
splice = arrayProto.splice;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys;
|
||||
var nativeKeys = overArg(Object.keys, Object);
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var DataView = getNative(root, 'DataView'),
|
||||
@@ -876,11 +876,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -925,23 +952,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1144,14 +1154,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1414,7 +1434,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1476,7 +1496,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1527,19 +1547,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1588,15 +1595,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1607,7 +1605,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1659,24 +1657,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1879,7 +1860,7 @@ function pullAllBy(array, values, iteratee) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -1938,7 +1919,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -1991,7 +1972,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -2047,7 +2028,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2098,8 +2079,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2107,16 +2087,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2138,7 +2117,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2194,28 +2173,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2346,7 +2303,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2371,23 +2328,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.pullallby",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.pullAllBy` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -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 2009-2016 Jeremy Ashkenas,
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
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:
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
The following license applies to all parts of this software except as
|
||||
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
|
||||
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.
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights 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 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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.pullallwith v4.6.1
|
||||
# lodash.pullallwith v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.pullAllWith` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var pullAllWith = require('lodash.pullallwith');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#pullAllWith) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.pullallwith) for more details.
|
||||
See the [documentation](https://lodash.com/docs#pullAllWith) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.pullallwith) for more details.
|
||||
|
||||
@@ -1,12 +1,187 @@
|
||||
/**
|
||||
* lodash 4.6.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
var basePullAll = require('lodash._basepullall');
|
||||
|
||||
/**
|
||||
* A specialized version of `_.map` for arrays without support for iteratee
|
||||
* shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Array} Returns the new mapped array.
|
||||
*/
|
||||
function arrayMap(array, iteratee) {
|
||||
var index = -1,
|
||||
length = array ? array.length : 0,
|
||||
result = Array(length);
|
||||
|
||||
while (++index < length) {
|
||||
result[index] = iteratee(array[index], index, array);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
||||
* support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
||||
var length = array.length,
|
||||
index = fromIndex + (fromRight ? 1 : -1);
|
||||
|
||||
while ((fromRight ? index-- : ++index < length)) {
|
||||
if (predicate(array[index], index, array)) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} value The value to search for.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function baseIndexOf(array, value, fromIndex) {
|
||||
if (value !== value) {
|
||||
return baseFindIndex(array, baseIsNaN, fromIndex);
|
||||
}
|
||||
var index = fromIndex - 1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (array[index] === value) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is like `baseIndexOf` except that it accepts a comparator.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} value The value to search for.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @param {Function} comparator The comparator invoked per element.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
||||
var index = fromIndex - 1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (comparator(array[index], value)) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.isNaN` without support for number objects.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
||||
*/
|
||||
function baseIsNaN(value) {
|
||||
return value !== value;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.unary` without support for storing metadata.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to cap arguments for.
|
||||
* @returns {Function} Returns the new capped function.
|
||||
*/
|
||||
function baseUnary(func) {
|
||||
return function(value) {
|
||||
return func(value);
|
||||
};
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype;
|
||||
|
||||
/** Built-in value references. */
|
||||
var splice = arrayProto.splice;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.pullAllBy` without support for iteratee
|
||||
* shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to modify.
|
||||
* @param {Array} values The values to remove.
|
||||
* @param {Function} [iteratee] The iteratee invoked per element.
|
||||
* @param {Function} [comparator] The comparator invoked per element.
|
||||
* @returns {Array} Returns `array`.
|
||||
*/
|
||||
function basePullAll(array, values, iteratee, comparator) {
|
||||
var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
|
||||
index = -1,
|
||||
length = values.length,
|
||||
seen = array;
|
||||
|
||||
if (array === values) {
|
||||
values = copyArray(values);
|
||||
}
|
||||
if (iteratee) {
|
||||
seen = arrayMap(array, baseUnary(iteratee));
|
||||
}
|
||||
while (++index < length) {
|
||||
var fromIndex = 0,
|
||||
value = values[index],
|
||||
computed = iteratee ? iteratee(value) : value;
|
||||
|
||||
while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
|
||||
if (seen !== array) {
|
||||
splice.call(seen, fromIndex, 1);
|
||||
}
|
||||
splice.call(array, fromIndex, 1);
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the values of `source` to `array`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} source The array to copy values from.
|
||||
* @param {Array} [array=[]] The array to copy values to.
|
||||
* @returns {Array} Returns `array`.
|
||||
*/
|
||||
function copyArray(source, array) {
|
||||
var index = -1,
|
||||
length = source.length;
|
||||
|
||||
array || (array = Array(length));
|
||||
while (++index < length) {
|
||||
array[index] = source[index];
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.pullAll` except that it accepts `comparator` which
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.pullallwith",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.pullAllWith` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -13,8 +13,5 @@
|
||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||
],
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basepullall": "~4.6.0"
|
||||
}
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.remove v4.6.1
|
||||
# lodash.remove v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.remove` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var remove = require('lodash.remove');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#remove) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.remove) for more details.
|
||||
See the [documentation](https://lodash.com/docs#remove) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.remove) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -238,7 +238,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -270,6 +270,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -282,14 +283,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -307,8 +308,7 @@ var Symbol = root.Symbol,
|
||||
splice = arrayProto.splice;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys;
|
||||
var nativeKeys = overArg(Object.keys, Object);
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var DataView = getNative(root, 'DataView'),
|
||||
@@ -776,11 +776,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -825,23 +852,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1044,14 +1054,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1323,7 +1343,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1385,7 +1405,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1436,19 +1456,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1497,15 +1504,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1516,7 +1514,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1568,24 +1566,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1839,7 +1820,7 @@ function remove(array, predicate) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -1898,7 +1879,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -1951,7 +1932,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -2007,7 +1988,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2058,8 +2039,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2067,16 +2047,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2098,7 +2077,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2154,28 +2133,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2306,7 +2263,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2331,23 +2288,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.remove",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.remove` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.sortby v4.6.1
|
||||
# lodash.sortby v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.sortBy` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var sortBy = require('lodash.sortby');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#sortBy) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.sortby) for more details.
|
||||
See the [documentation](https://lodash.com/docs#sortBy) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.sortby) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -317,7 +317,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -349,6 +349,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -361,14 +362,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -387,8 +388,7 @@ var Symbol = root.Symbol,
|
||||
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys,
|
||||
var nativeKeys = overArg(Object.keys, Object),
|
||||
nativeMax = Math.max;
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
@@ -857,11 +857,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -975,23 +1002,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1194,14 +1204,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.map` without support for iteratee shorthands.
|
||||
@@ -1611,7 +1631,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1673,7 +1693,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1724,19 +1744,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1785,15 +1792,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1804,7 +1802,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1856,24 +1854,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2129,7 +2110,7 @@ var sortBy = baseRest(function(collection, iteratees) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -2188,7 +2169,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -2241,7 +2222,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -2297,7 +2278,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2348,8 +2329,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2357,16 +2337,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2388,7 +2367,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2444,28 +2423,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2596,7 +2553,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2621,23 +2578,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.sortby",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.sortBy` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.sorteduniqby v4.6.1
|
||||
# lodash.sorteduniqby v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.sortedUniqBy` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var sortedUniqBy = require('lodash.sorteduniqby');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#sortedUniqBy) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.sorteduniqby) for more details.
|
||||
See the [documentation](https://lodash.com/docs#sortedUniqBy) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.sorteduniqby) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -238,7 +238,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -270,6 +270,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -282,14 +283,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -307,8 +308,7 @@ var Symbol = root.Symbol,
|
||||
splice = arrayProto.splice;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys;
|
||||
var nativeKeys = overArg(Object.keys, Object);
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var DataView = getNative(root, 'DataView'),
|
||||
@@ -776,11 +776,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -825,23 +852,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1044,14 +1054,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1284,7 +1304,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1346,7 +1366,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1397,19 +1417,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1458,15 +1465,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1477,7 +1475,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1529,24 +1527,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1741,7 +1722,7 @@ function sortedUniqBy(array, iteratee) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -1800,7 +1781,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -1853,7 +1834,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -1909,7 +1890,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1960,8 +1941,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -1969,16 +1949,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2000,7 +1979,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2056,28 +2035,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2208,7 +2165,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2233,23 +2190,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.sorteduniqby",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.sortedUniqBy` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.unionby v4.6.0
|
||||
# lodash.unionby v4.8.0
|
||||
|
||||
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');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#unionBy) or [package source](https://github.com/lodash/lodash/blob/4.6.0-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.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.unionby",
|
||||
"version": "4.6.0",
|
||||
"version": "4.8.0",
|
||||
"description": "The lodash method `_.unionBy` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -13,11 +13,5 @@
|
||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||
],
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseflatten": "~4.2.0",
|
||||
"lodash._baseiteratee": "~4.7.0",
|
||||
"lodash._baseuniq": "~4.6.0",
|
||||
"lodash.rest": "^4.0.0"
|
||||
}
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.uniqby v4.6.1
|
||||
# lodash.uniqby v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.uniqBy` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var uniqBy = require('lodash.uniqby');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#uniqBy) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.uniqby) for more details.
|
||||
See the [documentation](https://lodash.com/docs#uniqBy) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.uniqby) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -127,7 +127,7 @@ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
||||
* specifying an index to search from.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to search.
|
||||
* @param {Array} [array] The array to inspect.
|
||||
* @param {*} target The value to search for.
|
||||
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||||
*/
|
||||
@@ -140,7 +140,7 @@ function arrayIncludes(array, value) {
|
||||
* This function is like `arrayIncludes` except that it accepts a comparator.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to search.
|
||||
* @param {Array} [array] The array to inspect.
|
||||
* @param {*} target The value to search for.
|
||||
* @param {Function} comparator The comparator invoked per element.
|
||||
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||||
@@ -184,7 +184,7 @@ function arraySome(array, predicate) {
|
||||
* support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||
@@ -206,7 +206,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
||||
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} value The value to search for.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
@@ -343,7 +343,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -375,6 +375,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -387,14 +388,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -412,8 +413,7 @@ var Symbol = root.Symbol,
|
||||
splice = arrayProto.splice;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys;
|
||||
var nativeKeys = overArg(Object.keys, Object);
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var DataView = getNative(root, 'DataView'),
|
||||
@@ -881,11 +881,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -930,23 +957,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1149,14 +1159,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1434,7 +1454,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1496,7 +1516,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1547,19 +1567,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1608,15 +1615,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1627,7 +1625,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1679,24 +1677,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1897,7 +1878,7 @@ function uniqBy(array, iteratee) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -1956,7 +1937,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -2009,7 +1990,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -2065,7 +2046,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2116,8 +2097,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2125,16 +2105,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2156,7 +2135,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2212,28 +2191,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2364,7 +2321,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2389,23 +2346,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.uniqby",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.uniqBy` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -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 2009-2016 Jeremy Ashkenas,
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
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:
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
The following license applies to all parts of this software except as
|
||||
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
|
||||
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.
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights 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 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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.update v4.6.1
|
||||
# lodash.update v4.9.0
|
||||
|
||||
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');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#update) or [package source](https://github.com/lodash/lodash/blob/4.6.1-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.9.0-npm-packages/lodash.update) for more details.
|
||||
|
||||
@@ -1,43 +1,33 @@
|
||||
/**
|
||||
* lodash 4.6.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
var baseSet = require('lodash._baseset'),
|
||||
toString = require('lodash.tostring');
|
||||
stringToPath = require('lodash._stringtopath');
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0;
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var symbolTag = '[object Symbol]';
|
||||
|
||||
/** Used to match property names within property paths. */
|
||||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
reIsPlainProp = /^\w*$/,
|
||||
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g;
|
||||
reIsPlainProp = /^\w*$/;
|
||||
|
||||
/** Used to match backslashes in property paths. */
|
||||
var reEscapeChar = /\\(\\)?/g;
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Casts `value` to `identity` if it's not a function.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {Array} Returns the array-like object.
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
function baseCastFunction(value) {
|
||||
return typeof value == 'function' ? value : identity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `value` to a path array if it's not one.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {Array} Returns the cast property path array.
|
||||
*/
|
||||
function baseCastPath(value) {
|
||||
return isArray(value) ? value : stringToPath(value);
|
||||
}
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.get` without support for default values.
|
||||
@@ -48,13 +38,13 @@ function baseCastPath(value) {
|
||||
* @returns {*} Returns the resolved value.
|
||||
*/
|
||||
function baseGet(object, path) {
|
||||
path = isKey(path, object) ? [path + ''] : baseCastPath(path);
|
||||
path = isKey(path, object) ? [path] : castPath(path);
|
||||
|
||||
var index = 0,
|
||||
length = path.length;
|
||||
|
||||
while (object != null && index < length) {
|
||||
object = object[path[index++]];
|
||||
object = object[toKey(path[index++])];
|
||||
}
|
||||
return (index && index == length) ? object : undefined;
|
||||
}
|
||||
@@ -73,6 +63,28 @@ function baseUpdate(object, path, updater, customizer) {
|
||||
return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `value` to `identity` if it's not a function.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {Function} Returns cast function.
|
||||
*/
|
||||
function castFunction(value) {
|
||||
return typeof value == 'function' ? value : identity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `value` to a path array if it's not one.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {Array} Returns the cast property path array.
|
||||
*/
|
||||
function castPath(value) {
|
||||
return isArray(value) ? value : stringToPath(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a property name and not a property path.
|
||||
*
|
||||
@@ -82,27 +94,31 @@ function baseUpdate(object, path, updater, customizer) {
|
||||
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
||||
*/
|
||||
function isKey(value, object) {
|
||||
if (typeof value == 'number') {
|
||||
if (isArray(value)) {
|
||||
return false;
|
||||
}
|
||||
var type = typeof value;
|
||||
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
||||
value == null || isSymbol(value)) {
|
||||
return true;
|
||||
}
|
||||
return !isArray(value) &&
|
||||
(reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
||||
(object != null && value in Object(object)));
|
||||
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
||||
(object != null && value in Object(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `string` to a property path array.
|
||||
* Converts `value` to a string key if it's not a string or symbol.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to convert.
|
||||
* @returns {Array} Returns the property path array.
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {string|symbol} Returns the key.
|
||||
*/
|
||||
function stringToPath(string) {
|
||||
var result = [];
|
||||
toString(string).replace(rePropName, function(match, number, quote, string) {
|
||||
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
|
||||
});
|
||||
return result;
|
||||
function toKey(value) {
|
||||
if (typeof value == 'string' || isSymbol(value)) {
|
||||
return value;
|
||||
}
|
||||
var result = (value + '');
|
||||
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,10 +126,12 @@ function stringToPath(string) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @type {Function}
|
||||
* @category Lang
|
||||
* @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
|
||||
*
|
||||
* _.isArray([1, 2, 3]);
|
||||
@@ -130,6 +148,57 @@ function stringToPath(string) {
|
||||
*/
|
||||
var isArray = Array.isArray;
|
||||
|
||||
/**
|
||||
* 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 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.set` except that accepts `updater` to produce the
|
||||
* value to set. Use `_.updateWith` to customize `path` creation. The `updater`
|
||||
@@ -139,6 +208,7 @@ var isArray = Array.isArray;
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.6.0
|
||||
* @category Object
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {Array|string} path The path of the property to set.
|
||||
@@ -157,13 +227,14 @@ var isArray = Array.isArray;
|
||||
* // => 0
|
||||
*/
|
||||
function update(object, path, updater) {
|
||||
return object == null ? object : baseUpdate(object, path, baseCastFunction(updater));
|
||||
return object == null ? object : baseUpdate(object, path, castFunction(updater));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the first argument given to it.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Util
|
||||
* @param {*} value Any value.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.update",
|
||||
"version": "4.6.1",
|
||||
"version": "4.9.0",
|
||||
"description": "The lodash method `_.update` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -15,7 +15,7 @@
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseset": "~4.1.0",
|
||||
"lodash.tostring": "^4.0.0"
|
||||
"lodash._baseset": "~4.3.0",
|
||||
"lodash._stringtopath": "~4.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 2009-2016 Jeremy Ashkenas,
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
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:
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
The following license applies to all parts of this software except as
|
||||
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
|
||||
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.
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights 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 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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.updatewith v4.6.1
|
||||
# lodash.updatewith v4.9.0
|
||||
|
||||
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');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#updateWith) or [package source](https://github.com/lodash/lodash/blob/4.6.1-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.9.0-npm-packages/lodash.updatewith) for more details.
|
||||
|
||||
@@ -1,43 +1,33 @@
|
||||
/**
|
||||
* lodash 4.6.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
var baseSet = require('lodash._baseset'),
|
||||
toString = require('lodash.tostring');
|
||||
stringToPath = require('lodash._stringtopath');
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0;
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var symbolTag = '[object Symbol]';
|
||||
|
||||
/** Used to match property names within property paths. */
|
||||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
reIsPlainProp = /^\w*$/,
|
||||
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g;
|
||||
reIsPlainProp = /^\w*$/;
|
||||
|
||||
/** Used to match backslashes in property paths. */
|
||||
var reEscapeChar = /\\(\\)?/g;
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Casts `value` to `identity` if it's not a function.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {Array} Returns the array-like object.
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
function baseCastFunction(value) {
|
||||
return typeof value == 'function' ? value : identity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `value` to a path array if it's not one.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {Array} Returns the cast property path array.
|
||||
*/
|
||||
function baseCastPath(value) {
|
||||
return isArray(value) ? value : stringToPath(value);
|
||||
}
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.get` without support for default values.
|
||||
@@ -48,13 +38,13 @@ function baseCastPath(value) {
|
||||
* @returns {*} Returns the resolved value.
|
||||
*/
|
||||
function baseGet(object, path) {
|
||||
path = isKey(path, object) ? [path + ''] : baseCastPath(path);
|
||||
path = isKey(path, object) ? [path] : castPath(path);
|
||||
|
||||
var index = 0,
|
||||
length = path.length;
|
||||
|
||||
while (object != null && index < length) {
|
||||
object = object[path[index++]];
|
||||
object = object[toKey(path[index++])];
|
||||
}
|
||||
return (index && index == length) ? object : undefined;
|
||||
}
|
||||
@@ -73,6 +63,28 @@ function baseUpdate(object, path, updater, customizer) {
|
||||
return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `value` to `identity` if it's not a function.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {Function} Returns cast function.
|
||||
*/
|
||||
function castFunction(value) {
|
||||
return typeof value == 'function' ? value : identity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `value` to a path array if it's not one.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {Array} Returns the cast property path array.
|
||||
*/
|
||||
function castPath(value) {
|
||||
return isArray(value) ? value : stringToPath(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a property name and not a property path.
|
||||
*
|
||||
@@ -82,27 +94,31 @@ function baseUpdate(object, path, updater, customizer) {
|
||||
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
||||
*/
|
||||
function isKey(value, object) {
|
||||
if (typeof value == 'number') {
|
||||
if (isArray(value)) {
|
||||
return false;
|
||||
}
|
||||
var type = typeof value;
|
||||
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
||||
value == null || isSymbol(value)) {
|
||||
return true;
|
||||
}
|
||||
return !isArray(value) &&
|
||||
(reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
||||
(object != null && value in Object(object)));
|
||||
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
||||
(object != null && value in Object(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `string` to a property path array.
|
||||
* Converts `value` to a string key if it's not a string or symbol.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to convert.
|
||||
* @returns {Array} Returns the property path array.
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {string|symbol} Returns the key.
|
||||
*/
|
||||
function stringToPath(string) {
|
||||
var result = [];
|
||||
toString(string).replace(rePropName, function(match, number, quote, string) {
|
||||
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
|
||||
});
|
||||
return result;
|
||||
function toKey(value) {
|
||||
if (typeof value == 'string' || isSymbol(value)) {
|
||||
return value;
|
||||
}
|
||||
var result = (value + '');
|
||||
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,10 +126,12 @@ function stringToPath(string) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @type {Function}
|
||||
* @category Lang
|
||||
* @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
|
||||
*
|
||||
* _.isArray([1, 2, 3]);
|
||||
@@ -130,6 +148,57 @@ function stringToPath(string) {
|
||||
*/
|
||||
var isArray = Array.isArray;
|
||||
|
||||
/**
|
||||
* 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 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.update` except that it accepts `customizer` which is
|
||||
* invoked to produce the objects of `path`. If `customizer` returns `undefined`
|
||||
@@ -140,6 +209,7 @@ var isArray = Array.isArray;
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.6.0
|
||||
* @category Object
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {Array|string} path The path of the property to set.
|
||||
@@ -155,13 +225,14 @@ var isArray = Array.isArray;
|
||||
*/
|
||||
function updateWith(object, path, updater, customizer) {
|
||||
customizer = typeof customizer == 'function' ? customizer : undefined;
|
||||
return object == null ? object : baseUpdate(object, path, baseCastFunction(updater), customizer);
|
||||
return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the first argument given to it.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Util
|
||||
* @param {*} value Any value.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.updatewith",
|
||||
"version": "4.6.1",
|
||||
"version": "4.9.0",
|
||||
"description": "The lodash method `_.updateWith` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -15,7 +15,7 @@
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseset": "~4.1.0",
|
||||
"lodash.tostring": "^4.0.0"
|
||||
"lodash._baseset": "~4.3.0",
|
||||
"lodash._stringtopath": "~4.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.xorby v4.6.1
|
||||
# lodash.xorby v4.7.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.xorBy` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var xorBy = require('lodash.xorby');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#xorBy) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.xorby) for more details.
|
||||
See the [documentation](https://lodash.com/docs#xorBy) or [package source](https://github.com/lodash/lodash/blob/4.7.0-npm-packages/lodash.xorby) for more details.
|
||||
|
||||
@@ -62,7 +62,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
|
||||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||||
*/
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
@@ -171,7 +171,7 @@ function arrayFilter(array, predicate) {
|
||||
* specifying an index to search from.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to search.
|
||||
* @param {Array} [array] The array to inspect.
|
||||
* @param {*} target The value to search for.
|
||||
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||||
*/
|
||||
@@ -184,7 +184,7 @@ function arrayIncludes(array, value) {
|
||||
* This function is like `arrayIncludes` except that it accepts a comparator.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to search.
|
||||
* @param {Array} [array] The array to inspect.
|
||||
* @param {*} target The value to search for.
|
||||
* @param {Function} comparator The comparator invoked per element.
|
||||
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||||
@@ -267,7 +267,7 @@ function arraySome(array, predicate) {
|
||||
* support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||
@@ -289,7 +289,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
||||
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} value The value to search for.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
@@ -426,7 +426,7 @@ function mapToArray(map) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
* Creates a unary function that invokes `func` with its argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
@@ -458,6 +458,7 @@ function setToArray(set) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype,
|
||||
funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect overreaching core-js shims. */
|
||||
@@ -470,14 +471,14 @@ var maskSrcKey = (function() {
|
||||
}());
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
var funcToString = funcProto.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -495,8 +496,7 @@ var Symbol = root.Symbol,
|
||||
splice = arrayProto.splice;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeKeys = Object.keys,
|
||||
var nativeKeys = overArg(Object.keys, Object),
|
||||
nativeMax = Math.max;
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
@@ -965,11 +965,38 @@ Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @param {boolean} inherited Specify returning inherited property names.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
||||
var result = (isArray(value) || isArguments(value))
|
||||
? baseTimes(value.length, String)
|
||||
: [];
|
||||
|
||||
var length = result.length,
|
||||
skipIndexes = !!length;
|
||||
|
||||
for (var key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {*} key The key to search for.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
@@ -1070,23 +1097,6 @@ function baseGetTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.has` without support for deep paths.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [object] The object to query.
|
||||
* @param {Array|string} key The key to check.
|
||||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||||
*/
|
||||
function baseHas(object, key) {
|
||||
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
|
||||
// that are composed entirely of index properties, return `false` for
|
||||
// `hasOwnProperty` checks of them.
|
||||
return object != null &&
|
||||
(hasOwnProperty.call(object, key) ||
|
||||
(typeof object == 'object' && key in object && getPrototype(object) === null));
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.hasIn` without support for deep paths.
|
||||
*
|
||||
@@ -1289,14 +1299,24 @@ function baseIteratee(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't skip the constructor
|
||||
* property of prototypes or treat sparse arrays as dense.
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
var baseKeys = overArg(nativeKeys, Object);
|
||||
function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1628,7 +1648,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
||||
case regexpTag:
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
|
||||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||||
// for more details.
|
||||
return object == (other + '');
|
||||
|
||||
@@ -1690,7 +1710,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
if (!(isPartial ? key in other : baseHas(other, key))) {
|
||||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1741,19 +1761,6 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
* **Note:** This function is used to avoid a
|
||||
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
|
||||
* Safari on at least iOS 8.1-8.3 ARM64.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {*} Returns the "length" value.
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
@@ -1802,15 +1809,6 @@ function getNative(object, key) {
|
||||
return baseIsNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {null|Object} Returns the `[[Prototype]]`.
|
||||
*/
|
||||
var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
@@ -1821,7 +1819,7 @@ var getPrototype = overArg(nativeGetPrototype, Object);
|
||||
var getTag = baseGetTag;
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||
// for data views in Edge, and promises in Node.js.
|
||||
// for data views in Edge < 14, and promises in Node.js.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(Map && getTag(new Map) != mapTag) ||
|
||||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||||
@@ -1873,24 +1871,7 @@ function hasPath(object, path, hasFunc) {
|
||||
}
|
||||
var length = object ? object.length : 0;
|
||||
return !!length && isLength(length) && isIndex(key, length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of index keys for `object` values of arrays,
|
||||
* `arguments` objects, and strings, otherwise `null` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array|null} Returns index keys, else `null`.
|
||||
*/
|
||||
function indexKeys(object) {
|
||||
var length = object ? object.length : undefined;
|
||||
if (isLength(length) &&
|
||||
(isArray(object) || isString(object) || isArguments(object))) {
|
||||
return baseTimes(length, String);
|
||||
}
|
||||
return null;
|
||||
(isArray(object) || isArguments(object));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2113,7 +2094,7 @@ var xorBy = baseRest(function(arrays) {
|
||||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||||
* constructor with one whose instances implement the
|
||||
* [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
|
||||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||||
* method interface of `delete`, `get`, `has`, and `set`.
|
||||
*
|
||||
* @static
|
||||
@@ -2172,7 +2153,7 @@ memoize.Cache = MapCache;
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
@@ -2225,7 +2206,7 @@ function eq(value, other) {
|
||||
* // => false
|
||||
*/
|
||||
function isArguments(value) {
|
||||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
|
||||
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
||||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
||||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
||||
}
|
||||
@@ -2281,7 +2262,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
return value != null && isLength(value.length) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2332,8 +2313,7 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -2341,16 +2321,15 @@ function isFunction(value) {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
* **Note:** This method is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
@@ -2372,7 +2351,7 @@ function isLength(value) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
@@ -2428,28 +2407,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `String` primitive or object.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isString('abc');
|
||||
* // => true
|
||||
*
|
||||
* _.isString(1);
|
||||
* // => false
|
||||
*/
|
||||
function isString(value) {
|
||||
return typeof value == 'string' ||
|
||||
(!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Symbol` primitive or object.
|
||||
*
|
||||
@@ -2580,7 +2537,7 @@ function hasIn(object, path) {
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -2605,23 +2562,7 @@ function hasIn(object, path) {
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
function keys(object) {
|
||||
var isProto = isPrototype(object);
|
||||
if (!(isProto || isArrayLike(object))) {
|
||||
return baseKeys(object);
|
||||
}
|
||||
var indexes = indexKeys(object),
|
||||
skipIndexes = !!indexes,
|
||||
result = indexes || [],
|
||||
length = result.length;
|
||||
|
||||
for (var key in object) {
|
||||
if (baseHas(object, key) &&
|
||||
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.xorby",
|
||||
"version": "4.6.1",
|
||||
"version": "4.7.0",
|
||||
"description": "The lodash method `_.xorBy` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
Reference in New Issue
Block a user