mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
Compare commits
5 Commits
4.2.3-npm-
...
4.3.2-npm-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
958d7f06dd | ||
|
|
5b0364fb20 | ||
|
|
607a8b4075 | ||
|
|
ecb20e4c11 | ||
|
|
efac96034f |
@@ -1,4 +1,4 @@
|
||||
# lodash v4.2.3
|
||||
# lodash v4.3.2
|
||||
|
||||
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
|
||||
|
||||
|
||||
@@ -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._basepullat v4.2.1
|
||||
# lodash._basepullat v4.3.0
|
||||
|
||||
The internal [lodash](https://lodash.com/) function `basePullAt` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var basePullAt = require('lodash._basepullat');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash._basepullat) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash._basepullat) for more details.
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
/**
|
||||
* lodash 4.2.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.0 (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 baseSlice = require('lodash._baseslice'),
|
||||
toString = require('lodash.tostring');
|
||||
stringToPath = require('lodash._stringtopath');
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||
|
||||
/** `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;
|
||||
|
||||
/** Used to match backslashes in property paths. */
|
||||
var reEscapeChar = /\\(\\)?/g;
|
||||
reIsPlainProp = /^\w*$/;
|
||||
|
||||
/** Used to detect unsigned integer values. */
|
||||
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
||||
@@ -38,22 +37,19 @@ function isIndex(value, length) {
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = Array.prototype;
|
||||
var arrayProto = Array.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/** Built-in value references. */
|
||||
var splice = arrayProto.splice;
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.get` without support for default values.
|
||||
*
|
||||
@@ -63,7 +59,7 @@ 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;
|
||||
@@ -95,7 +91,7 @@ function basePullAt(array, indexes) {
|
||||
splice.call(array, index, 1);
|
||||
}
|
||||
else if (!isKey(index, array)) {
|
||||
var path = baseCastPath(index),
|
||||
var path = castPath(index),
|
||||
object = parent(array, path);
|
||||
|
||||
if (object != null) {
|
||||
@@ -110,6 +106,17 @@ function basePullAt(array, indexes) {
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
@@ -119,11 +126,12 @@ function basePullAt(array, indexes) {
|
||||
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
||||
*/
|
||||
function isKey(value, object) {
|
||||
if (typeof value == 'number') {
|
||||
var type = typeof value;
|
||||
if (type == 'number' || type == 'symbol') {
|
||||
return true;
|
||||
}
|
||||
return !isArray(value) &&
|
||||
(reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
||||
(isSymbol(value) || reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
||||
(object != null && value in Object(object)));
|
||||
}
|
||||
|
||||
@@ -136,22 +144,7 @@ function isKey(value, object) {
|
||||
* @returns {*} Returns the parent value.
|
||||
*/
|
||||
function parent(object, path) {
|
||||
return path.length == 1 ? object : get(object, baseSlice(path, 0, -1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `string` to a property path array.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to convert.
|
||||
* @returns {Array} Returns the property path array.
|
||||
*/
|
||||
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;
|
||||
return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -159,6 +152,7 @@ function stringToPath(string) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to query.
|
||||
* @returns {*} Returns the last element of `array`.
|
||||
@@ -177,10 +171,12 @@ function last(array) {
|
||||
*
|
||||
* @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]);
|
||||
@@ -198,32 +194,54 @@ function last(array) {
|
||||
var isArray = Array.isArray;
|
||||
|
||||
/**
|
||||
* Gets the value at `path` of `object`. If the resolved value is
|
||||
* `undefined` the `defaultValue` is used in its place.
|
||||
* 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 _
|
||||
* @category Object
|
||||
* @param {Object} object The object to query.
|
||||
* @param {Array|string} path The path of the property to get.
|
||||
* @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
|
||||
* @returns {*} Returns the resolved value.
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
||||
* _.isObjectLike({});
|
||||
* // => true
|
||||
*
|
||||
* _.get(object, 'a[0].b.c');
|
||||
* // => 3
|
||||
* _.isObjectLike([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.get(object, ['a', '0', 'b', 'c']);
|
||||
* // => 3
|
||||
* _.isObjectLike(_.noop);
|
||||
* // => false
|
||||
*
|
||||
* _.get(object, 'a.b.c', 'default');
|
||||
* // => 'default'
|
||||
* _.isObjectLike(null);
|
||||
* // => false
|
||||
*/
|
||||
function get(object, path, defaultValue) {
|
||||
var result = object == null ? undefined : baseGet(object, path);
|
||||
return result === undefined ? defaultValue : result;
|
||||
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);
|
||||
}
|
||||
|
||||
module.exports = basePullAt;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash._basepullat",
|
||||
"version": "4.2.1",
|
||||
"version": "4.3.0",
|
||||
"description": "The internal lodash function `basePullAt` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -15,6 +15,6 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseslice": "~4.0.0",
|
||||
"lodash.tostring": "^4.0.0"
|
||||
"lodash._stringtopath": "~4.7.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
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.
|
||||
@@ -1,18 +0,0 @@
|
||||
# lodash._baseset v4.2.2
|
||||
|
||||
The internal [lodash](https://lodash.com/) function `baseSet` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
```bash
|
||||
$ {sudo -H} npm i -g npm
|
||||
$ npm i --save lodash._baseset
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
var baseSet = require('lodash._baseset');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/blob/4.2.2-npm-packages/lodash._baseset) for more details.
|
||||
@@ -1,300 +0,0 @@
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
var stringToPath = require('lodash._stringtopath');
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0,
|
||||
MAX_SAFE_INTEGER = 9007199254740991;
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var symbolTag = '[object Symbol]';
|
||||
|
||||
/** Used to match property names within property paths. */
|
||||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
reIsPlainProp = /^\w*$/;
|
||||
|
||||
/** Used to detect unsigned integer values. */
|
||||
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** 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)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/**
|
||||
* 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)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {string} key The key of the property to assign.
|
||||
* @param {*} value The value to assign.
|
||||
*/
|
||||
function assignValue(object, key, value) {
|
||||
var objValue = object[key];
|
||||
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
||||
(value === undefined && !(key in object))) {
|
||||
object[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @param {Array|string} path The path of the property to set.
|
||||
* @param {*} value The value to set.
|
||||
* @param {Function} [customizer] The function to customize path creation.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseSet(object, path, value, customizer) {
|
||||
path = isKey(path, object) ? [path] : castPath(path);
|
||||
|
||||
var index = -1,
|
||||
length = path.length,
|
||||
lastIndex = length - 1,
|
||||
nested = object;
|
||||
|
||||
while (nested != null && ++index < length) {
|
||||
var key = toKey(path[index]);
|
||||
if (isObject(nested)) {
|
||||
var newValue = value;
|
||||
if (index != lastIndex) {
|
||||
var objValue = nested[key];
|
||||
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
||||
if (newValue === undefined) {
|
||||
newValue = objValue == null
|
||||
? (isIndex(path[index + 1]) ? [] : {})
|
||||
: objValue;
|
||||
}
|
||||
}
|
||||
assignValue(nested, key, newValue);
|
||||
}
|
||||
nested = nested[key];
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 valid array-like index.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||
*/
|
||||
function isIndex(value, length) {
|
||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||
return !!length &&
|
||||
(typeof value == 'number' || reIsUint.test(value)) &&
|
||||
(value > -1 && value % 1 == 0 && value < length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a property name and not a property path.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @param {Object} [object] The object to query keys on.
|
||||
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
||||
*/
|
||||
function isKey(value, object) {
|
||||
if (isArray(value)) {
|
||||
return false;
|
||||
}
|
||||
var type = typeof value;
|
||||
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
||||
value == null || isSymbol(value)) {
|
||||
return true;
|
||||
}
|
||||
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
||||
(object != null && value in Object(object));
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `value` to a string key if it's not a string or symbol.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {string|symbol} Returns the key.
|
||||
*/
|
||||
function toKey(value) {
|
||||
if (typeof value == 'string' || isSymbol(value)) {
|
||||
return value;
|
||||
}
|
||||
var result = (value + '');
|
||||
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to compare.
|
||||
* @param {*} other The other value to compare.
|
||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'user': 'fred' };
|
||||
* var other = { 'user': 'fred' };
|
||||
*
|
||||
* _.eq(object, object);
|
||||
* // => true
|
||||
*
|
||||
* _.eq(object, other);
|
||||
* // => false
|
||||
*
|
||||
* _.eq('a', 'a');
|
||||
* // => true
|
||||
*
|
||||
* _.eq('a', Object('a'));
|
||||
* // => false
|
||||
*
|
||||
* _.eq(NaN, NaN);
|
||||
* // => true
|
||||
*/
|
||||
function eq(value, other) {
|
||||
return value === other || (value !== value && other !== other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as an `Array` object.
|
||||
*
|
||||
* @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`.
|
||||
* @example
|
||||
*
|
||||
* _.isArray([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isArray(document.body.children);
|
||||
* // => false
|
||||
*
|
||||
* _.isArray('abc');
|
||||
* // => false
|
||||
*
|
||||
* _.isArray(_.noop);
|
||||
* // => false
|
||||
*/
|
||||
var isArray = Array.isArray;
|
||||
|
||||
/**
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObject({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObject([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(_.noop);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObject(value) {
|
||||
var type = typeof value;
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||
* and has a `typeof` result of "object".
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObjectLike({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike(_.noop);
|
||||
* // => false
|
||||
*
|
||||
* _.isObjectLike(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is 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);
|
||||
}
|
||||
|
||||
module.exports = baseSet;
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.at v4.2.0
|
||||
# lodash.at v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.at` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var at = require('lodash.at');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#at) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.at) for more details.
|
||||
See the [documentation](https://lodash.com/docs#at) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.at) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 4.2.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.0 (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>
|
||||
@@ -21,7 +21,8 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -46,17 +47,6 @@ function baseAt(object, paths) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.get` without support for default values.
|
||||
*
|
||||
@@ -66,7 +56,7 @@ 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;
|
||||
@@ -77,6 +67,17 @@ function baseGet(object, path) {
|
||||
return (index && index == length) ? object : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
@@ -181,8 +182,7 @@ function isSymbol(value) {
|
||||
* @since 1.0.0
|
||||
* @category Object
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {...(string|string[])} [paths] The property paths of elements to pick,
|
||||
* specified individually or in arrays.
|
||||
* @param {...(string|string[])} [paths] The property paths of elements to pick.
|
||||
* @returns {Array} Returns the new array of picked elements.
|
||||
* @example
|
||||
*
|
||||
@@ -200,7 +200,7 @@ var at = rest(function(object, paths) {
|
||||
|
||||
/**
|
||||
* Gets the value at `path` of `object`. If the resolved value is
|
||||
* `undefined` the `defaultValue` is used in its place.
|
||||
* `undefined`, the `defaultValue` is used in its place.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.at",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.at` 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._baseflatten": "~4.1.0",
|
||||
"lodash._baseflatten": "~4.2.0",
|
||||
"lodash._stringtopath": "~4.7.0",
|
||||
"lodash.rest": "^4.0.0"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.bindall v4.2.1
|
||||
# lodash.bindall v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.bindAll` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var bindAll = require('lodash.bindall');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#bindAll) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.bindall) for more details.
|
||||
See the [documentation](https://lodash.com/docs#bindAll) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.bindall) for more details.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.bindall",
|
||||
"version": "4.2.1",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.bindAll` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -13,10 +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.bind": "^4.0.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.camelcase v4.2.0
|
||||
# lodash.camelcase v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.camelCase` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var camelCase = require('lodash.camelcase');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#camelCase) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.camelcase) for more details.
|
||||
See the [documentation](https://lodash.com/docs#camelCase) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.camelcase) for more details.
|
||||
|
||||
@@ -13,11 +13,11 @@ var INFINITY = 1 / 0;
|
||||
/** `Object#toString` result references. */
|
||||
var symbolTag = '[object Symbol]';
|
||||
|
||||
/** Used to match non-compound words composed of alphanumeric characters. */
|
||||
var reBasicWord = /[a-zA-Z0-9]+/g;
|
||||
/** Used to match words composed of alphanumeric characters. */
|
||||
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
||||
|
||||
/** Used to match latin-1 supplementary letters (excluding mathematical operators). */
|
||||
var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
|
||||
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
||||
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
||||
|
||||
/** Used to compose unicode character classes. */
|
||||
var rsAstralRange = '\\ud800-\\udfff',
|
||||
@@ -72,10 +72,10 @@ var reApos = RegExp(rsApos, 'g');
|
||||
var reComboMark = RegExp(rsCombo, 'g');
|
||||
|
||||
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
||||
var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
||||
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
||||
|
||||
/** Used to match complex or compound words. */
|
||||
var reComplexWord = RegExp([
|
||||
var reUnicodeWord = RegExp([
|
||||
rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
||||
rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
|
||||
rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
|
||||
@@ -85,21 +85,22 @@ var reComplexWord = RegExp([
|
||||
].join('|'), 'g');
|
||||
|
||||
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
||||
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
|
||||
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
|
||||
|
||||
/** Used to detect strings that need a more robust regexp to match words. */
|
||||
var reHasComplexWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
||||
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
||||
|
||||
/** Used to map latin-1 supplementary letters to basic latin letters. */
|
||||
/** Used to map Latin Unicode letters to basic Latin letters. */
|
||||
var deburredLetters = {
|
||||
// Latin-1 Supplement block.
|
||||
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
||||
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
||||
'\xc7': 'C', '\xe7': 'c',
|
||||
'\xd0': 'D', '\xf0': 'd',
|
||||
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
||||
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
||||
'\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
||||
'\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
||||
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
||||
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
||||
'\xd1': 'N', '\xf1': 'n',
|
||||
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
||||
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
||||
@@ -108,7 +109,43 @@ var deburredLetters = {
|
||||
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
||||
'\xc6': 'Ae', '\xe6': 'ae',
|
||||
'\xde': 'Th', '\xfe': 'th',
|
||||
'\xdf': 'ss'
|
||||
'\xdf': 'ss',
|
||||
// Latin Extended-A block.
|
||||
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
||||
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
||||
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
||||
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
||||
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
||||
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
||||
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
||||
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
||||
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
||||
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
||||
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
||||
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
||||
'\u0134': 'J', '\u0135': 'j',
|
||||
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
||||
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
||||
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
||||
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
||||
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
||||
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
||||
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
||||
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
||||
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
||||
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
||||
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
||||
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
||||
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
||||
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
||||
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
||||
'\u0174': 'W', '\u0175': 'w',
|
||||
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
||||
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
||||
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
||||
'\u0132': 'IJ', '\u0133': 'ij',
|
||||
'\u0152': 'Oe', '\u0153': 'oe',
|
||||
'\u0149': "'n", '\u017f': 'ss'
|
||||
};
|
||||
|
||||
/** Detect free variable `global` from Node.js. */
|
||||
@@ -145,6 +182,28 @@ function arrayReduce(array, iteratee, accumulator, initAccum) {
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts an ASCII `string` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function asciiToArray(string) {
|
||||
return string.split('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits an ASCII `string` into an array of its words.
|
||||
*
|
||||
* @private
|
||||
* @param {string} The string to inspect.
|
||||
* @returns {Array} Returns the words of `string`.
|
||||
*/
|
||||
function asciiWords(string) {
|
||||
return string.match(reAsciiWord) || [];
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.propertyOf` without support for deep paths.
|
||||
*
|
||||
@@ -159,7 +218,8 @@ function basePropertyOf(object) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
|
||||
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
||||
* letters to basic Latin letters.
|
||||
*
|
||||
* @private
|
||||
* @param {string} letter The matched letter to deburr.
|
||||
@@ -167,6 +227,28 @@ function basePropertyOf(object) {
|
||||
*/
|
||||
var deburrLetter = basePropertyOf(deburredLetters);
|
||||
|
||||
/**
|
||||
* Checks if `string` contains Unicode symbols.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to inspect.
|
||||
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
||||
*/
|
||||
function hasUnicode(string) {
|
||||
return reHasUnicode.test(string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `string` contains a word composed of Unicode symbols.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to inspect.
|
||||
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
||||
*/
|
||||
function hasUnicodeWord(string) {
|
||||
return reHasUnicodeWord.test(string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `string` to an array.
|
||||
*
|
||||
@@ -175,7 +257,31 @@ var deburrLetter = basePropertyOf(deburredLetters);
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function stringToArray(string) {
|
||||
return string.match(reComplexSymbol);
|
||||
return hasUnicode(string)
|
||||
? unicodeToArray(string)
|
||||
: asciiToArray(string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a Unicode `string` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function unicodeToArray(string) {
|
||||
return string.match(reUnicode) || [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits a Unicode `string` into an array of its words.
|
||||
*
|
||||
* @private
|
||||
* @param {string} The string to inspect.
|
||||
* @returns {Array} Returns the words of `string`.
|
||||
*/
|
||||
function unicodeWords(string) {
|
||||
return string.match(reUnicodeWord) || [];
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
@@ -183,7 +289,7 @@ var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
@@ -271,7 +377,7 @@ function createCaseFirst(methodName) {
|
||||
return function(string) {
|
||||
string = toString(string);
|
||||
|
||||
var strSymbols = reHasComplexSymbol.test(string)
|
||||
var strSymbols = hasUnicode(string)
|
||||
? stringToArray(string)
|
||||
: undefined;
|
||||
|
||||
@@ -421,8 +527,9 @@ function capitalize(string) {
|
||||
|
||||
/**
|
||||
* Deburrs `string` by converting
|
||||
* [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
||||
* to basic latin letters and removing
|
||||
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
||||
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
||||
* letters to basic Latin letters and removing
|
||||
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
||||
*
|
||||
* @static
|
||||
@@ -438,7 +545,7 @@ function capitalize(string) {
|
||||
*/
|
||||
function deburr(string) {
|
||||
string = toString(string);
|
||||
return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
|
||||
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -484,7 +591,7 @@ function words(string, pattern, guard) {
|
||||
pattern = guard ? undefined : pattern;
|
||||
|
||||
if (pattern === undefined) {
|
||||
pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord;
|
||||
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
|
||||
}
|
||||
return string.match(pattern) || [];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.camelcase",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.camelCase` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.clone v4.2.0
|
||||
# lodash.clone v4.3.2
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.clone` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var clone = require('lodash.clone');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#clone) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.clone) for more details.
|
||||
See the [documentation](https://lodash.com/docs#clone) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.clone) for more details.
|
||||
|
||||
@@ -1,678 +1,12 @@
|
||||
/**
|
||||
* lodash 4.2.0 (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/>
|
||||
* 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>
|
||||
*/
|
||||
var Stack = require('lodash._stack'),
|
||||
baseFor = require('lodash._basefor'),
|
||||
isBuffer = require('lodash.isbuffer'),
|
||||
keys = require('lodash.keys'),
|
||||
root = require('lodash._root');
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var argsTag = '[object Arguments]',
|
||||
arrayTag = '[object Array]',
|
||||
boolTag = '[object Boolean]',
|
||||
dateTag = '[object Date]',
|
||||
errorTag = '[object Error]',
|
||||
funcTag = '[object Function]',
|
||||
genTag = '[object GeneratorFunction]',
|
||||
mapTag = '[object Map]',
|
||||
numberTag = '[object Number]',
|
||||
objectTag = '[object Object]',
|
||||
regexpTag = '[object RegExp]',
|
||||
setTag = '[object Set]',
|
||||
stringTag = '[object String]',
|
||||
symbolTag = '[object Symbol]',
|
||||
weakMapTag = '[object WeakMap]';
|
||||
|
||||
var arrayBufferTag = '[object ArrayBuffer]',
|
||||
float32Tag = '[object Float32Array]',
|
||||
float64Tag = '[object Float64Array]',
|
||||
int8Tag = '[object Int8Array]',
|
||||
int16Tag = '[object Int16Array]',
|
||||
int32Tag = '[object Int32Array]',
|
||||
uint8Tag = '[object Uint8Array]',
|
||||
uint8ClampedTag = '[object Uint8ClampedArray]',
|
||||
uint16Tag = '[object Uint16Array]',
|
||||
uint32Tag = '[object Uint32Array]';
|
||||
|
||||
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
/** Used to match `RegExp` flags from their coerced string values. */
|
||||
var reFlags = /\w*$/;
|
||||
|
||||
/** Used to detect host constructors (Safari > 5). */
|
||||
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||||
|
||||
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
||||
var cloneableTags = {};
|
||||
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
||||
cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
|
||||
cloneableTags[dateTag] = cloneableTags[float32Tag] =
|
||||
cloneableTags[float64Tag] = cloneableTags[int8Tag] =
|
||||
cloneableTags[int16Tag] = cloneableTags[int32Tag] =
|
||||
cloneableTags[mapTag] = cloneableTags[numberTag] =
|
||||
cloneableTags[objectTag] = cloneableTags[regexpTag] =
|
||||
cloneableTags[setTag] = cloneableTags[stringTag] =
|
||||
cloneableTags[symbolTag] = cloneableTags[uint8Tag] =
|
||||
cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] =
|
||||
cloneableTags[uint32Tag] = true;
|
||||
cloneableTags[errorTag] = cloneableTags[funcTag] =
|
||||
cloneableTags[weakMapTag] = false;
|
||||
|
||||
/**
|
||||
* Adds the key-value `pair` to `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to modify.
|
||||
* @param {Array} pair The key-value pair to add.
|
||||
* @returns {Object} Returns `map`.
|
||||
*/
|
||||
function addMapEntry(map, pair) {
|
||||
map.set(pair[0], pair[1]);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds `value` to `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to modify.
|
||||
* @param {*} value The value to add.
|
||||
* @returns {Object} Returns `set`.
|
||||
*/
|
||||
function addSetEntry(set, value) {
|
||||
set.add(value);
|
||||
return set;
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `_.forEach` 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 `array`.
|
||||
*/
|
||||
function arrayEach(array, iteratee) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (iteratee(array[index], index, array) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `_.reduce` for arrays without support for
|
||||
* iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {*} [accumulator] The initial value.
|
||||
* @param {boolean} [initAccum] Specify using the first element of `array` as the initial value.
|
||||
* @returns {*} Returns the accumulated value.
|
||||
*/
|
||||
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
if (initAccum && length) {
|
||||
accumulator = array[++index];
|
||||
}
|
||||
while (++index < length) {
|
||||
accumulator = iteratee(accumulator, array[index], index, array);
|
||||
}
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a host object in IE < 9.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
||||
*/
|
||||
function isHostObject(value) {
|
||||
// Many host objects are `Object` objects that can coerce to strings
|
||||
// despite having improperly defined `toString` methods.
|
||||
var result = false;
|
||||
if (value != null && typeof value.toString != 'function') {
|
||||
try {
|
||||
result = !!(value + '');
|
||||
} catch (e) {}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `map` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function mapToArray(map) {
|
||||
var index = -1,
|
||||
result = Array(map.size);
|
||||
|
||||
map.forEach(function(value, key) {
|
||||
result[++index] = [key, value];
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `set` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function setToArray(set) {
|
||||
var index = -1,
|
||||
result = Array(set.size);
|
||||
|
||||
set.forEach(function(value) {
|
||||
result[++index] = value;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.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)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/** Used to detect if a method is native. */
|
||||
var reIsNative = RegExp('^' +
|
||||
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
||||
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
||||
);
|
||||
|
||||
/** Built-in value references. */
|
||||
var Symbol = root.Symbol,
|
||||
Uint8Array = root.Uint8Array,
|
||||
getOwnPropertySymbols = Object.getOwnPropertySymbols,
|
||||
objectCreate = Object.create;
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var Map = getNative(root, 'Map'),
|
||||
Set = getNative(root, 'Set'),
|
||||
WeakMap = getNative(root, 'WeakMap');
|
||||
|
||||
/** Used to detect maps, sets, and weakmaps. */
|
||||
var mapCtorString = Map ? funcToString.call(Map) : '',
|
||||
setCtorString = Set ? funcToString.call(Set) : '',
|
||||
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';
|
||||
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
||||
symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
|
||||
|
||||
/**
|
||||
* 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)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {string} key The key of the property to assign.
|
||||
* @param {*} value The value to assign.
|
||||
*/
|
||||
function assignValue(object, key, value) {
|
||||
var objValue = object[key];
|
||||
if ((!eq(objValue, value) ||
|
||||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) ||
|
||||
(value === undefined && !(key in object))) {
|
||||
object[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.assign` without support for multiple sources
|
||||
* or `customizer` functions.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The destination object.
|
||||
* @param {Object} source The source object.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseAssign(object, source) {
|
||||
return object && copyObject(source, keys(source), object);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
||||
* traversed objects.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @param {Function} [customizer] The function to customize cloning.
|
||||
* @param {string} [key] The key of `value`.
|
||||
* @param {Object} [object] The parent object of `value`.
|
||||
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
||||
* @returns {*} Returns the cloned value.
|
||||
*/
|
||||
function baseClone(value, isDeep, customizer, key, object, stack) {
|
||||
var result;
|
||||
if (customizer) {
|
||||
result = object ? customizer(value, key, object, stack) : customizer(value);
|
||||
}
|
||||
if (result !== undefined) {
|
||||
return result;
|
||||
}
|
||||
if (!isObject(value)) {
|
||||
return value;
|
||||
}
|
||||
var isArr = isArray(value);
|
||||
if (isArr) {
|
||||
result = initCloneArray(value);
|
||||
if (!isDeep) {
|
||||
return copyArray(value, result);
|
||||
}
|
||||
} else {
|
||||
var tag = getTag(value),
|
||||
isFunc = tag == funcTag || tag == genTag;
|
||||
|
||||
if (isBuffer(value)) {
|
||||
return cloneBuffer(value, isDeep);
|
||||
}
|
||||
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
||||
if (isHostObject(value)) {
|
||||
return object ? value : {};
|
||||
}
|
||||
result = initCloneObject(isFunc ? {} : value);
|
||||
if (!isDeep) {
|
||||
return copySymbols(value, baseAssign(result, value));
|
||||
}
|
||||
} else {
|
||||
return cloneableTags[tag]
|
||||
? initCloneByTag(value, tag, isDeep)
|
||||
: (object ? value : {});
|
||||
}
|
||||
}
|
||||
// Check for circular references and return its corresponding clone.
|
||||
stack || (stack = new Stack);
|
||||
var stacked = stack.get(value);
|
||||
if (stacked) {
|
||||
return stacked;
|
||||
}
|
||||
stack.set(value, result);
|
||||
|
||||
// Recursively populate clone (susceptible to call stack limits).
|
||||
(isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
|
||||
assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack));
|
||||
});
|
||||
return isArr ? result : copySymbols(value, result);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.create` without support for assigning
|
||||
* properties to the created object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} prototype The object to inherit from.
|
||||
* @returns {Object} Returns the new object.
|
||||
*/
|
||||
function baseCreate(proto) {
|
||||
return isObject(proto) ? objectCreate(proto) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForOwn(object, iteratee) {
|
||||
return object && baseFor(object, iteratee, keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `buffer`.
|
||||
*
|
||||
* @private
|
||||
* @param {Buffer} buffer The buffer to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Buffer} Returns the cloned buffer.
|
||||
*/
|
||||
function cloneBuffer(buffer, isDeep) {
|
||||
if (isDeep) {
|
||||
return buffer.slice();
|
||||
}
|
||||
var Ctor = buffer.constructor,
|
||||
result = new Ctor(buffer.length);
|
||||
|
||||
buffer.copy(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `arrayBuffer`.
|
||||
*
|
||||
* @private
|
||||
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
||||
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
||||
*/
|
||||
function cloneArrayBuffer(arrayBuffer) {
|
||||
var Ctor = arrayBuffer.constructor,
|
||||
result = new Ctor(arrayBuffer.byteLength),
|
||||
view = new Uint8Array(result);
|
||||
|
||||
view.set(new Uint8Array(arrayBuffer));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to clone.
|
||||
* @returns {Object} Returns the cloned map.
|
||||
*/
|
||||
function cloneMap(map) {
|
||||
var Ctor = map.constructor;
|
||||
return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `regexp`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} regexp The regexp to clone.
|
||||
* @returns {Object} Returns the cloned regexp.
|
||||
*/
|
||||
function cloneRegExp(regexp) {
|
||||
var Ctor = regexp.constructor,
|
||||
result = new Ctor(regexp.source, reFlags.exec(regexp));
|
||||
|
||||
result.lastIndex = regexp.lastIndex;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to clone.
|
||||
* @returns {Object} Returns the cloned set.
|
||||
*/
|
||||
function cloneSet(set) {
|
||||
var Ctor = set.constructor;
|
||||
return arrayReduce(setToArray(set), addSetEntry, new Ctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of the `symbol` object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} symbol The symbol object to clone.
|
||||
* @returns {Object} Returns the cloned symbol object.
|
||||
*/
|
||||
function cloneSymbol(symbol) {
|
||||
return Symbol ? Object(symbolValueOf.call(symbol)) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `typedArray`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} typedArray The typed array to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the cloned typed array.
|
||||
*/
|
||||
function cloneTypedArray(typedArray, isDeep) {
|
||||
var arrayBuffer = typedArray.buffer,
|
||||
buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer,
|
||||
Ctor = typedArray.constructor;
|
||||
|
||||
return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies properties of `source` to `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy properties from.
|
||||
* @param {Array} props The property names to copy.
|
||||
* @param {Object} [object={}] The object to copy properties to.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copyObject(source, props, object) {
|
||||
return copyObjectWith(source, props, object);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is like `copyObject` except that it accepts a function to
|
||||
* customize copied values.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy properties from.
|
||||
* @param {Array} props The property names to copy.
|
||||
* @param {Object} [object={}] The object to copy properties to.
|
||||
* @param {Function} [customizer] The function to customize copied values.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copyObjectWith(source, props, object, customizer) {
|
||||
object || (object = {});
|
||||
|
||||
var index = -1,
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
|
||||
var newValue = customizer
|
||||
? customizer(object[key], source[key], key, object, source)
|
||||
: source[key];
|
||||
|
||||
assignValue(object, key, newValue);
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies own symbol properties of `source` to `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy symbols from.
|
||||
* @param {Object} [object={}] The object to copy symbols to.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copySymbols(source, object) {
|
||||
return copyObject(source, getSymbols(source), object);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the native function at `key` of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @param {string} key The key of the method to get.
|
||||
* @returns {*} Returns the function if it's native, else `undefined`.
|
||||
*/
|
||||
function getNative(object, key) {
|
||||
var value = object == null ? undefined : object[key];
|
||||
return isNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of the own symbol properties of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of symbols.
|
||||
*/
|
||||
var getSymbols = getOwnPropertySymbols || function() {
|
||||
return [];
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {string} Returns the `toStringTag`.
|
||||
*/
|
||||
function getTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps.
|
||||
if ((Map && getTag(new Map) != mapTag) ||
|
||||
(Set && getTag(new Set) != setTag) ||
|
||||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
||||
getTag = function(value) {
|
||||
var result = objectToString.call(value),
|
||||
Ctor = result == objectTag ? value.constructor : null,
|
||||
ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
|
||||
|
||||
if (ctorString) {
|
||||
switch (ctorString) {
|
||||
case mapCtorString: return mapTag;
|
||||
case setCtorString: return setTag;
|
||||
case weakMapCtorString: return weakMapTag;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an array clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to clone.
|
||||
* @returns {Array} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneArray(array) {
|
||||
var length = array.length,
|
||||
result = array.constructor(length);
|
||||
|
||||
// Add properties assigned by `RegExp#exec`.
|
||||
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
||||
result.index = array.index;
|
||||
result.input = array.input;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an object clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneObject(object) {
|
||||
if (isPrototype(object)) {
|
||||
return {};
|
||||
}
|
||||
var Ctor = object.constructor;
|
||||
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an object clone based on its `toStringTag`.
|
||||
*
|
||||
* **Note:** This function only supports cloning values with tags of
|
||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {string} tag The `toStringTag` of the object to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneByTag(object, tag, isDeep) {
|
||||
var Ctor = object.constructor;
|
||||
switch (tag) {
|
||||
case arrayBufferTag:
|
||||
return cloneArrayBuffer(object);
|
||||
|
||||
case boolTag:
|
||||
case dateTag:
|
||||
return new Ctor(+object);
|
||||
|
||||
case float32Tag: case float64Tag:
|
||||
case int8Tag: case int16Tag: case int32Tag:
|
||||
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
||||
return cloneTypedArray(object, isDeep);
|
||||
|
||||
case mapTag:
|
||||
return cloneMap(object);
|
||||
|
||||
case numberTag:
|
||||
case stringTag:
|
||||
return new Ctor(object);
|
||||
|
||||
case regexpTag:
|
||||
return cloneRegExp(object);
|
||||
|
||||
case setTag:
|
||||
return cloneSet(object);
|
||||
|
||||
case symbolTag:
|
||||
return cloneSymbol(object);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is likely a prototype object.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
||||
*/
|
||||
function isPrototype(value) {
|
||||
var Ctor = value && value.constructor,
|
||||
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
||||
|
||||
return value === proto;
|
||||
}
|
||||
var baseClone = require('lodash._baseclone');
|
||||
|
||||
/**
|
||||
* Creates a shallow clone of `value`.
|
||||
@@ -687,9 +21,11 @@ function isPrototype(value) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to clone.
|
||||
* @returns {*} Returns the cloned value.
|
||||
* @see _.cloneDeep
|
||||
* @example
|
||||
*
|
||||
* var objects = [{ 'a': 1 }, { 'b': 2 }];
|
||||
@@ -699,172 +35,7 @@ function isPrototype(value) {
|
||||
* // => true
|
||||
*/
|
||||
function clone(value) {
|
||||
return baseClone(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to compare.
|
||||
* @param {*} other The other value to compare.
|
||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'user': 'fred' };
|
||||
* var other = { 'user': 'fred' };
|
||||
*
|
||||
* _.eq(object, object);
|
||||
* // => true
|
||||
*
|
||||
* _.eq(object, other);
|
||||
* // => false
|
||||
*
|
||||
* _.eq('a', 'a');
|
||||
* // => true
|
||||
*
|
||||
* _.eq('a', Object('a'));
|
||||
* // => false
|
||||
*
|
||||
* _.eq(NaN, NaN);
|
||||
* // => true
|
||||
*/
|
||||
function eq(value, other) {
|
||||
return value === other || (value !== value && other !== other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as an `Array` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type {Function}
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArray([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isArray(document.body.children);
|
||||
* // => false
|
||||
*
|
||||
* _.isArray('abc');
|
||||
* // => false
|
||||
*
|
||||
* _.isArray(_.noop);
|
||||
* // => false
|
||||
*/
|
||||
var isArray = Array.isArray;
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Function` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isFunction(_);
|
||||
* // => true
|
||||
*
|
||||
* _.isFunction(/abc/);
|
||||
* // => false
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array constructors, and
|
||||
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObject({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObject([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(_.noop);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObject(value) {
|
||||
var type = typeof value;
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||
* and has a `typeof` result of "object".
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObjectLike({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike(_.noop);
|
||||
* // => false
|
||||
*
|
||||
* _.isObjectLike(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a native function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @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 (value == null) {
|
||||
return false;
|
||||
}
|
||||
if (isFunction(value)) {
|
||||
return reIsNative.test(funcToString.call(value));
|
||||
}
|
||||
return isObjectLike(value) &&
|
||||
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
|
||||
return baseClone(value, false, true);
|
||||
}
|
||||
|
||||
module.exports = clone;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.clone",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.2",
|
||||
"description": "The lodash method `_.clone` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -9,16 +9,12 @@
|
||||
"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@iceddev.com> (https://github.com/phated)",
|
||||
"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.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basefor": "^3.0.0",
|
||||
"lodash._root": "^3.0.0",
|
||||
"lodash._stack": "^4.0.0",
|
||||
"lodash.isbuffer": "^4.0.0",
|
||||
"lodash.keys": "^4.0.0"
|
||||
"lodash._baseclone": "~4.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.clonedeep v4.2.0
|
||||
# lodash.clonedeep v4.3.2
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.cloneDeep` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var cloneDeep = require('lodash.clonedeep');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#cloneDeep) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.clonedeep) for more details.
|
||||
See the [documentation](https://lodash.com/docs#cloneDeep) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.clonedeep) for more details.
|
||||
|
||||
@@ -1,687 +1,23 @@
|
||||
/**
|
||||
* lodash 4.2.0 (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/>
|
||||
* 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>
|
||||
*/
|
||||
var Stack = require('lodash._stack'),
|
||||
baseFor = require('lodash._basefor'),
|
||||
isBuffer = require('lodash.isbuffer'),
|
||||
keys = require('lodash.keys'),
|
||||
root = require('lodash._root');
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var argsTag = '[object Arguments]',
|
||||
arrayTag = '[object Array]',
|
||||
boolTag = '[object Boolean]',
|
||||
dateTag = '[object Date]',
|
||||
errorTag = '[object Error]',
|
||||
funcTag = '[object Function]',
|
||||
genTag = '[object GeneratorFunction]',
|
||||
mapTag = '[object Map]',
|
||||
numberTag = '[object Number]',
|
||||
objectTag = '[object Object]',
|
||||
regexpTag = '[object RegExp]',
|
||||
setTag = '[object Set]',
|
||||
stringTag = '[object String]',
|
||||
symbolTag = '[object Symbol]',
|
||||
weakMapTag = '[object WeakMap]';
|
||||
|
||||
var arrayBufferTag = '[object ArrayBuffer]',
|
||||
float32Tag = '[object Float32Array]',
|
||||
float64Tag = '[object Float64Array]',
|
||||
int8Tag = '[object Int8Array]',
|
||||
int16Tag = '[object Int16Array]',
|
||||
int32Tag = '[object Int32Array]',
|
||||
uint8Tag = '[object Uint8Array]',
|
||||
uint8ClampedTag = '[object Uint8ClampedArray]',
|
||||
uint16Tag = '[object Uint16Array]',
|
||||
uint32Tag = '[object Uint32Array]';
|
||||
|
||||
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
/** Used to match `RegExp` flags from their coerced string values. */
|
||||
var reFlags = /\w*$/;
|
||||
|
||||
/** Used to detect host constructors (Safari > 5). */
|
||||
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||||
|
||||
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
||||
var cloneableTags = {};
|
||||
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
||||
cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
|
||||
cloneableTags[dateTag] = cloneableTags[float32Tag] =
|
||||
cloneableTags[float64Tag] = cloneableTags[int8Tag] =
|
||||
cloneableTags[int16Tag] = cloneableTags[int32Tag] =
|
||||
cloneableTags[mapTag] = cloneableTags[numberTag] =
|
||||
cloneableTags[objectTag] = cloneableTags[regexpTag] =
|
||||
cloneableTags[setTag] = cloneableTags[stringTag] =
|
||||
cloneableTags[symbolTag] = cloneableTags[uint8Tag] =
|
||||
cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] =
|
||||
cloneableTags[uint32Tag] = true;
|
||||
cloneableTags[errorTag] = cloneableTags[funcTag] =
|
||||
cloneableTags[weakMapTag] = false;
|
||||
|
||||
/**
|
||||
* Adds the key-value `pair` to `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to modify.
|
||||
* @param {Array} pair The key-value pair to add.
|
||||
* @returns {Object} Returns `map`.
|
||||
*/
|
||||
function addMapEntry(map, pair) {
|
||||
map.set(pair[0], pair[1]);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds `value` to `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to modify.
|
||||
* @param {*} value The value to add.
|
||||
* @returns {Object} Returns `set`.
|
||||
*/
|
||||
function addSetEntry(set, value) {
|
||||
set.add(value);
|
||||
return set;
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `_.forEach` 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 `array`.
|
||||
*/
|
||||
function arrayEach(array, iteratee) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (iteratee(array[index], index, array) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `_.reduce` for arrays without support for
|
||||
* iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {*} [accumulator] The initial value.
|
||||
* @param {boolean} [initAccum] Specify using the first element of `array` as the initial value.
|
||||
* @returns {*} Returns the accumulated value.
|
||||
*/
|
||||
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
if (initAccum && length) {
|
||||
accumulator = array[++index];
|
||||
}
|
||||
while (++index < length) {
|
||||
accumulator = iteratee(accumulator, array[index], index, array);
|
||||
}
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a host object in IE < 9.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
||||
*/
|
||||
function isHostObject(value) {
|
||||
// Many host objects are `Object` objects that can coerce to strings
|
||||
// despite having improperly defined `toString` methods.
|
||||
var result = false;
|
||||
if (value != null && typeof value.toString != 'function') {
|
||||
try {
|
||||
result = !!(value + '');
|
||||
} catch (e) {}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `map` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function mapToArray(map) {
|
||||
var index = -1,
|
||||
result = Array(map.size);
|
||||
|
||||
map.forEach(function(value, key) {
|
||||
result[++index] = [key, value];
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `set` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function setToArray(set) {
|
||||
var index = -1,
|
||||
result = Array(set.size);
|
||||
|
||||
set.forEach(function(value) {
|
||||
result[++index] = value;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.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)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/** Used to detect if a method is native. */
|
||||
var reIsNative = RegExp('^' +
|
||||
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
||||
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
||||
);
|
||||
|
||||
/** Built-in value references. */
|
||||
var Symbol = root.Symbol,
|
||||
Uint8Array = root.Uint8Array,
|
||||
getOwnPropertySymbols = Object.getOwnPropertySymbols,
|
||||
objectCreate = Object.create;
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var Map = getNative(root, 'Map'),
|
||||
Set = getNative(root, 'Set'),
|
||||
WeakMap = getNative(root, 'WeakMap');
|
||||
|
||||
/** Used to detect maps, sets, and weakmaps. */
|
||||
var mapCtorString = Map ? funcToString.call(Map) : '',
|
||||
setCtorString = Set ? funcToString.call(Set) : '',
|
||||
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';
|
||||
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
||||
symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
|
||||
|
||||
/**
|
||||
* 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)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {string} key The key of the property to assign.
|
||||
* @param {*} value The value to assign.
|
||||
*/
|
||||
function assignValue(object, key, value) {
|
||||
var objValue = object[key];
|
||||
if ((!eq(objValue, value) ||
|
||||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) ||
|
||||
(value === undefined && !(key in object))) {
|
||||
object[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.assign` without support for multiple sources
|
||||
* or `customizer` functions.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The destination object.
|
||||
* @param {Object} source The source object.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseAssign(object, source) {
|
||||
return object && copyObject(source, keys(source), object);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
||||
* traversed objects.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @param {Function} [customizer] The function to customize cloning.
|
||||
* @param {string} [key] The key of `value`.
|
||||
* @param {Object} [object] The parent object of `value`.
|
||||
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
||||
* @returns {*} Returns the cloned value.
|
||||
*/
|
||||
function baseClone(value, isDeep, customizer, key, object, stack) {
|
||||
var result;
|
||||
if (customizer) {
|
||||
result = object ? customizer(value, key, object, stack) : customizer(value);
|
||||
}
|
||||
if (result !== undefined) {
|
||||
return result;
|
||||
}
|
||||
if (!isObject(value)) {
|
||||
return value;
|
||||
}
|
||||
var isArr = isArray(value);
|
||||
if (isArr) {
|
||||
result = initCloneArray(value);
|
||||
if (!isDeep) {
|
||||
return copyArray(value, result);
|
||||
}
|
||||
} else {
|
||||
var tag = getTag(value),
|
||||
isFunc = tag == funcTag || tag == genTag;
|
||||
|
||||
if (isBuffer(value)) {
|
||||
return cloneBuffer(value, isDeep);
|
||||
}
|
||||
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
||||
if (isHostObject(value)) {
|
||||
return object ? value : {};
|
||||
}
|
||||
result = initCloneObject(isFunc ? {} : value);
|
||||
if (!isDeep) {
|
||||
return copySymbols(value, baseAssign(result, value));
|
||||
}
|
||||
} else {
|
||||
return cloneableTags[tag]
|
||||
? initCloneByTag(value, tag, isDeep)
|
||||
: (object ? value : {});
|
||||
}
|
||||
}
|
||||
// Check for circular references and return its corresponding clone.
|
||||
stack || (stack = new Stack);
|
||||
var stacked = stack.get(value);
|
||||
if (stacked) {
|
||||
return stacked;
|
||||
}
|
||||
stack.set(value, result);
|
||||
|
||||
// Recursively populate clone (susceptible to call stack limits).
|
||||
(isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
|
||||
assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack));
|
||||
});
|
||||
return isArr ? result : copySymbols(value, result);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.create` without support for assigning
|
||||
* properties to the created object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} prototype The object to inherit from.
|
||||
* @returns {Object} Returns the new object.
|
||||
*/
|
||||
function baseCreate(proto) {
|
||||
return isObject(proto) ? objectCreate(proto) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForOwn(object, iteratee) {
|
||||
return object && baseFor(object, iteratee, keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `buffer`.
|
||||
*
|
||||
* @private
|
||||
* @param {Buffer} buffer The buffer to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Buffer} Returns the cloned buffer.
|
||||
*/
|
||||
function cloneBuffer(buffer, isDeep) {
|
||||
if (isDeep) {
|
||||
return buffer.slice();
|
||||
}
|
||||
var Ctor = buffer.constructor,
|
||||
result = new Ctor(buffer.length);
|
||||
|
||||
buffer.copy(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `arrayBuffer`.
|
||||
*
|
||||
* @private
|
||||
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
||||
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
||||
*/
|
||||
function cloneArrayBuffer(arrayBuffer) {
|
||||
var Ctor = arrayBuffer.constructor,
|
||||
result = new Ctor(arrayBuffer.byteLength),
|
||||
view = new Uint8Array(result);
|
||||
|
||||
view.set(new Uint8Array(arrayBuffer));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to clone.
|
||||
* @returns {Object} Returns the cloned map.
|
||||
*/
|
||||
function cloneMap(map) {
|
||||
var Ctor = map.constructor;
|
||||
return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `regexp`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} regexp The regexp to clone.
|
||||
* @returns {Object} Returns the cloned regexp.
|
||||
*/
|
||||
function cloneRegExp(regexp) {
|
||||
var Ctor = regexp.constructor,
|
||||
result = new Ctor(regexp.source, reFlags.exec(regexp));
|
||||
|
||||
result.lastIndex = regexp.lastIndex;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to clone.
|
||||
* @returns {Object} Returns the cloned set.
|
||||
*/
|
||||
function cloneSet(set) {
|
||||
var Ctor = set.constructor;
|
||||
return arrayReduce(setToArray(set), addSetEntry, new Ctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of the `symbol` object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} symbol The symbol object to clone.
|
||||
* @returns {Object} Returns the cloned symbol object.
|
||||
*/
|
||||
function cloneSymbol(symbol) {
|
||||
return Symbol ? Object(symbolValueOf.call(symbol)) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `typedArray`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} typedArray The typed array to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the cloned typed array.
|
||||
*/
|
||||
function cloneTypedArray(typedArray, isDeep) {
|
||||
var arrayBuffer = typedArray.buffer,
|
||||
buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer,
|
||||
Ctor = typedArray.constructor;
|
||||
|
||||
return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies properties of `source` to `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy properties from.
|
||||
* @param {Array} props The property names to copy.
|
||||
* @param {Object} [object={}] The object to copy properties to.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copyObject(source, props, object) {
|
||||
return copyObjectWith(source, props, object);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is like `copyObject` except that it accepts a function to
|
||||
* customize copied values.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy properties from.
|
||||
* @param {Array} props The property names to copy.
|
||||
* @param {Object} [object={}] The object to copy properties to.
|
||||
* @param {Function} [customizer] The function to customize copied values.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copyObjectWith(source, props, object, customizer) {
|
||||
object || (object = {});
|
||||
|
||||
var index = -1,
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
|
||||
var newValue = customizer
|
||||
? customizer(object[key], source[key], key, object, source)
|
||||
: source[key];
|
||||
|
||||
assignValue(object, key, newValue);
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies own symbol properties of `source` to `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy symbols from.
|
||||
* @param {Object} [object={}] The object to copy symbols to.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copySymbols(source, object) {
|
||||
return copyObject(source, getSymbols(source), object);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the native function at `key` of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @param {string} key The key of the method to get.
|
||||
* @returns {*} Returns the function if it's native, else `undefined`.
|
||||
*/
|
||||
function getNative(object, key) {
|
||||
var value = object == null ? undefined : object[key];
|
||||
return isNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of the own symbol properties of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of symbols.
|
||||
*/
|
||||
var getSymbols = getOwnPropertySymbols || function() {
|
||||
return [];
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {string} Returns the `toStringTag`.
|
||||
*/
|
||||
function getTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps.
|
||||
if ((Map && getTag(new Map) != mapTag) ||
|
||||
(Set && getTag(new Set) != setTag) ||
|
||||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
||||
getTag = function(value) {
|
||||
var result = objectToString.call(value),
|
||||
Ctor = result == objectTag ? value.constructor : null,
|
||||
ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
|
||||
|
||||
if (ctorString) {
|
||||
switch (ctorString) {
|
||||
case mapCtorString: return mapTag;
|
||||
case setCtorString: return setTag;
|
||||
case weakMapCtorString: return weakMapTag;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an array clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to clone.
|
||||
* @returns {Array} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneArray(array) {
|
||||
var length = array.length,
|
||||
result = array.constructor(length);
|
||||
|
||||
// Add properties assigned by `RegExp#exec`.
|
||||
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
||||
result.index = array.index;
|
||||
result.input = array.input;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an object clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneObject(object) {
|
||||
if (isPrototype(object)) {
|
||||
return {};
|
||||
}
|
||||
var Ctor = object.constructor;
|
||||
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an object clone based on its `toStringTag`.
|
||||
*
|
||||
* **Note:** This function only supports cloning values with tags of
|
||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {string} tag The `toStringTag` of the object to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneByTag(object, tag, isDeep) {
|
||||
var Ctor = object.constructor;
|
||||
switch (tag) {
|
||||
case arrayBufferTag:
|
||||
return cloneArrayBuffer(object);
|
||||
|
||||
case boolTag:
|
||||
case dateTag:
|
||||
return new Ctor(+object);
|
||||
|
||||
case float32Tag: case float64Tag:
|
||||
case int8Tag: case int16Tag: case int32Tag:
|
||||
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
||||
return cloneTypedArray(object, isDeep);
|
||||
|
||||
case mapTag:
|
||||
return cloneMap(object);
|
||||
|
||||
case numberTag:
|
||||
case stringTag:
|
||||
return new Ctor(object);
|
||||
|
||||
case regexpTag:
|
||||
return cloneRegExp(object);
|
||||
|
||||
case setTag:
|
||||
return cloneSet(object);
|
||||
|
||||
case symbolTag:
|
||||
return cloneSymbol(object);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is likely a prototype object.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
||||
*/
|
||||
function isPrototype(value) {
|
||||
var Ctor = value && value.constructor,
|
||||
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
||||
|
||||
return value === proto;
|
||||
}
|
||||
var baseClone = require('lodash._baseclone');
|
||||
|
||||
/**
|
||||
* This method is like `_.clone` except that it recursively clones `value`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 1.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to recursively clone.
|
||||
* @returns {*} Returns the deep cloned value.
|
||||
* @see _.clone
|
||||
* @example
|
||||
*
|
||||
* var objects = [{ 'a': 1 }, { 'b': 2 }];
|
||||
@@ -691,172 +27,7 @@ function isPrototype(value) {
|
||||
* // => false
|
||||
*/
|
||||
function cloneDeep(value) {
|
||||
return baseClone(value, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to compare.
|
||||
* @param {*} other The other value to compare.
|
||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'user': 'fred' };
|
||||
* var other = { 'user': 'fred' };
|
||||
*
|
||||
* _.eq(object, object);
|
||||
* // => true
|
||||
*
|
||||
* _.eq(object, other);
|
||||
* // => false
|
||||
*
|
||||
* _.eq('a', 'a');
|
||||
* // => true
|
||||
*
|
||||
* _.eq('a', Object('a'));
|
||||
* // => false
|
||||
*
|
||||
* _.eq(NaN, NaN);
|
||||
* // => true
|
||||
*/
|
||||
function eq(value, other) {
|
||||
return value === other || (value !== value && other !== other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as an `Array` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type {Function}
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArray([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isArray(document.body.children);
|
||||
* // => false
|
||||
*
|
||||
* _.isArray('abc');
|
||||
* // => false
|
||||
*
|
||||
* _.isArray(_.noop);
|
||||
* // => false
|
||||
*/
|
||||
var isArray = Array.isArray;
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Function` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isFunction(_);
|
||||
* // => true
|
||||
*
|
||||
* _.isFunction(/abc/);
|
||||
* // => false
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array constructors, and
|
||||
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObject({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObject([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(_.noop);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObject(value) {
|
||||
var type = typeof value;
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||
* and has a `typeof` result of "object".
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObjectLike({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike(_.noop);
|
||||
* // => false
|
||||
*
|
||||
* _.isObjectLike(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a native function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @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 (value == null) {
|
||||
return false;
|
||||
}
|
||||
if (isFunction(value)) {
|
||||
return reIsNative.test(funcToString.call(value));
|
||||
}
|
||||
return isObjectLike(value) &&
|
||||
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
|
||||
return baseClone(value, true, true);
|
||||
}
|
||||
|
||||
module.exports = cloneDeep;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.clonedeep",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.2",
|
||||
"description": "The lodash method `_.cloneDeep` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -9,16 +9,12 @@
|
||||
"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@iceddev.com> (https://github.com/phated)",
|
||||
"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.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basefor": "^3.0.0",
|
||||
"lodash._root": "^3.0.0",
|
||||
"lodash._stack": "^4.0.0",
|
||||
"lodash.isbuffer": "^4.0.0",
|
||||
"lodash.keys": "^4.0.0"
|
||||
"lodash._baseclone": "~4.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.clonedeepwith v4.2.0
|
||||
# lodash.clonedeepwith v4.3.2
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.cloneDeepWith` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var cloneDeepWith = require('lodash.clonedeepwith');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#cloneDeepWith) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.clonedeepwith) for more details.
|
||||
See the [documentation](https://lodash.com/docs#cloneDeepWith) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.clonedeepwith) for more details.
|
||||
|
||||
@@ -1,688 +1,24 @@
|
||||
/**
|
||||
* lodash 4.2.0 (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/>
|
||||
* 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>
|
||||
*/
|
||||
var Stack = require('lodash._stack'),
|
||||
baseFor = require('lodash._basefor'),
|
||||
isBuffer = require('lodash.isbuffer'),
|
||||
keys = require('lodash.keys'),
|
||||
root = require('lodash._root');
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var argsTag = '[object Arguments]',
|
||||
arrayTag = '[object Array]',
|
||||
boolTag = '[object Boolean]',
|
||||
dateTag = '[object Date]',
|
||||
errorTag = '[object Error]',
|
||||
funcTag = '[object Function]',
|
||||
genTag = '[object GeneratorFunction]',
|
||||
mapTag = '[object Map]',
|
||||
numberTag = '[object Number]',
|
||||
objectTag = '[object Object]',
|
||||
regexpTag = '[object RegExp]',
|
||||
setTag = '[object Set]',
|
||||
stringTag = '[object String]',
|
||||
symbolTag = '[object Symbol]',
|
||||
weakMapTag = '[object WeakMap]';
|
||||
|
||||
var arrayBufferTag = '[object ArrayBuffer]',
|
||||
float32Tag = '[object Float32Array]',
|
||||
float64Tag = '[object Float64Array]',
|
||||
int8Tag = '[object Int8Array]',
|
||||
int16Tag = '[object Int16Array]',
|
||||
int32Tag = '[object Int32Array]',
|
||||
uint8Tag = '[object Uint8Array]',
|
||||
uint8ClampedTag = '[object Uint8ClampedArray]',
|
||||
uint16Tag = '[object Uint16Array]',
|
||||
uint32Tag = '[object Uint32Array]';
|
||||
|
||||
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
/** Used to match `RegExp` flags from their coerced string values. */
|
||||
var reFlags = /\w*$/;
|
||||
|
||||
/** Used to detect host constructors (Safari > 5). */
|
||||
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||||
|
||||
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
||||
var cloneableTags = {};
|
||||
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
||||
cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
|
||||
cloneableTags[dateTag] = cloneableTags[float32Tag] =
|
||||
cloneableTags[float64Tag] = cloneableTags[int8Tag] =
|
||||
cloneableTags[int16Tag] = cloneableTags[int32Tag] =
|
||||
cloneableTags[mapTag] = cloneableTags[numberTag] =
|
||||
cloneableTags[objectTag] = cloneableTags[regexpTag] =
|
||||
cloneableTags[setTag] = cloneableTags[stringTag] =
|
||||
cloneableTags[symbolTag] = cloneableTags[uint8Tag] =
|
||||
cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] =
|
||||
cloneableTags[uint32Tag] = true;
|
||||
cloneableTags[errorTag] = cloneableTags[funcTag] =
|
||||
cloneableTags[weakMapTag] = false;
|
||||
|
||||
/**
|
||||
* Adds the key-value `pair` to `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to modify.
|
||||
* @param {Array} pair The key-value pair to add.
|
||||
* @returns {Object} Returns `map`.
|
||||
*/
|
||||
function addMapEntry(map, pair) {
|
||||
map.set(pair[0], pair[1]);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds `value` to `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to modify.
|
||||
* @param {*} value The value to add.
|
||||
* @returns {Object} Returns `set`.
|
||||
*/
|
||||
function addSetEntry(set, value) {
|
||||
set.add(value);
|
||||
return set;
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `_.forEach` 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 `array`.
|
||||
*/
|
||||
function arrayEach(array, iteratee) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (iteratee(array[index], index, array) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `_.reduce` for arrays without support for
|
||||
* iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {*} [accumulator] The initial value.
|
||||
* @param {boolean} [initAccum] Specify using the first element of `array` as the initial value.
|
||||
* @returns {*} Returns the accumulated value.
|
||||
*/
|
||||
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
if (initAccum && length) {
|
||||
accumulator = array[++index];
|
||||
}
|
||||
while (++index < length) {
|
||||
accumulator = iteratee(accumulator, array[index], index, array);
|
||||
}
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a host object in IE < 9.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
||||
*/
|
||||
function isHostObject(value) {
|
||||
// Many host objects are `Object` objects that can coerce to strings
|
||||
// despite having improperly defined `toString` methods.
|
||||
var result = false;
|
||||
if (value != null && typeof value.toString != 'function') {
|
||||
try {
|
||||
result = !!(value + '');
|
||||
} catch (e) {}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `map` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function mapToArray(map) {
|
||||
var index = -1,
|
||||
result = Array(map.size);
|
||||
|
||||
map.forEach(function(value, key) {
|
||||
result[++index] = [key, value];
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `set` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function setToArray(set) {
|
||||
var index = -1,
|
||||
result = Array(set.size);
|
||||
|
||||
set.forEach(function(value) {
|
||||
result[++index] = value;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.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)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/** Used to detect if a method is native. */
|
||||
var reIsNative = RegExp('^' +
|
||||
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
||||
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
||||
);
|
||||
|
||||
/** Built-in value references. */
|
||||
var Symbol = root.Symbol,
|
||||
Uint8Array = root.Uint8Array,
|
||||
getOwnPropertySymbols = Object.getOwnPropertySymbols,
|
||||
objectCreate = Object.create;
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var Map = getNative(root, 'Map'),
|
||||
Set = getNative(root, 'Set'),
|
||||
WeakMap = getNative(root, 'WeakMap');
|
||||
|
||||
/** Used to detect maps, sets, and weakmaps. */
|
||||
var mapCtorString = Map ? funcToString.call(Map) : '',
|
||||
setCtorString = Set ? funcToString.call(Set) : '',
|
||||
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';
|
||||
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
||||
symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
|
||||
|
||||
/**
|
||||
* 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)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {string} key The key of the property to assign.
|
||||
* @param {*} value The value to assign.
|
||||
*/
|
||||
function assignValue(object, key, value) {
|
||||
var objValue = object[key];
|
||||
if ((!eq(objValue, value) ||
|
||||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) ||
|
||||
(value === undefined && !(key in object))) {
|
||||
object[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.assign` without support for multiple sources
|
||||
* or `customizer` functions.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The destination object.
|
||||
* @param {Object} source The source object.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseAssign(object, source) {
|
||||
return object && copyObject(source, keys(source), object);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
||||
* traversed objects.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @param {Function} [customizer] The function to customize cloning.
|
||||
* @param {string} [key] The key of `value`.
|
||||
* @param {Object} [object] The parent object of `value`.
|
||||
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
||||
* @returns {*} Returns the cloned value.
|
||||
*/
|
||||
function baseClone(value, isDeep, customizer, key, object, stack) {
|
||||
var result;
|
||||
if (customizer) {
|
||||
result = object ? customizer(value, key, object, stack) : customizer(value);
|
||||
}
|
||||
if (result !== undefined) {
|
||||
return result;
|
||||
}
|
||||
if (!isObject(value)) {
|
||||
return value;
|
||||
}
|
||||
var isArr = isArray(value);
|
||||
if (isArr) {
|
||||
result = initCloneArray(value);
|
||||
if (!isDeep) {
|
||||
return copyArray(value, result);
|
||||
}
|
||||
} else {
|
||||
var tag = getTag(value),
|
||||
isFunc = tag == funcTag || tag == genTag;
|
||||
|
||||
if (isBuffer(value)) {
|
||||
return cloneBuffer(value, isDeep);
|
||||
}
|
||||
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
||||
if (isHostObject(value)) {
|
||||
return object ? value : {};
|
||||
}
|
||||
result = initCloneObject(isFunc ? {} : value);
|
||||
if (!isDeep) {
|
||||
return copySymbols(value, baseAssign(result, value));
|
||||
}
|
||||
} else {
|
||||
return cloneableTags[tag]
|
||||
? initCloneByTag(value, tag, isDeep)
|
||||
: (object ? value : {});
|
||||
}
|
||||
}
|
||||
// Check for circular references and return its corresponding clone.
|
||||
stack || (stack = new Stack);
|
||||
var stacked = stack.get(value);
|
||||
if (stacked) {
|
||||
return stacked;
|
||||
}
|
||||
stack.set(value, result);
|
||||
|
||||
// Recursively populate clone (susceptible to call stack limits).
|
||||
(isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
|
||||
assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack));
|
||||
});
|
||||
return isArr ? result : copySymbols(value, result);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.create` without support for assigning
|
||||
* properties to the created object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} prototype The object to inherit from.
|
||||
* @returns {Object} Returns the new object.
|
||||
*/
|
||||
function baseCreate(proto) {
|
||||
return isObject(proto) ? objectCreate(proto) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForOwn(object, iteratee) {
|
||||
return object && baseFor(object, iteratee, keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `buffer`.
|
||||
*
|
||||
* @private
|
||||
* @param {Buffer} buffer The buffer to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Buffer} Returns the cloned buffer.
|
||||
*/
|
||||
function cloneBuffer(buffer, isDeep) {
|
||||
if (isDeep) {
|
||||
return buffer.slice();
|
||||
}
|
||||
var Ctor = buffer.constructor,
|
||||
result = new Ctor(buffer.length);
|
||||
|
||||
buffer.copy(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `arrayBuffer`.
|
||||
*
|
||||
* @private
|
||||
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
||||
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
||||
*/
|
||||
function cloneArrayBuffer(arrayBuffer) {
|
||||
var Ctor = arrayBuffer.constructor,
|
||||
result = new Ctor(arrayBuffer.byteLength),
|
||||
view = new Uint8Array(result);
|
||||
|
||||
view.set(new Uint8Array(arrayBuffer));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to clone.
|
||||
* @returns {Object} Returns the cloned map.
|
||||
*/
|
||||
function cloneMap(map) {
|
||||
var Ctor = map.constructor;
|
||||
return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `regexp`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} regexp The regexp to clone.
|
||||
* @returns {Object} Returns the cloned regexp.
|
||||
*/
|
||||
function cloneRegExp(regexp) {
|
||||
var Ctor = regexp.constructor,
|
||||
result = new Ctor(regexp.source, reFlags.exec(regexp));
|
||||
|
||||
result.lastIndex = regexp.lastIndex;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to clone.
|
||||
* @returns {Object} Returns the cloned set.
|
||||
*/
|
||||
function cloneSet(set) {
|
||||
var Ctor = set.constructor;
|
||||
return arrayReduce(setToArray(set), addSetEntry, new Ctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of the `symbol` object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} symbol The symbol object to clone.
|
||||
* @returns {Object} Returns the cloned symbol object.
|
||||
*/
|
||||
function cloneSymbol(symbol) {
|
||||
return Symbol ? Object(symbolValueOf.call(symbol)) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `typedArray`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} typedArray The typed array to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the cloned typed array.
|
||||
*/
|
||||
function cloneTypedArray(typedArray, isDeep) {
|
||||
var arrayBuffer = typedArray.buffer,
|
||||
buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer,
|
||||
Ctor = typedArray.constructor;
|
||||
|
||||
return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies properties of `source` to `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy properties from.
|
||||
* @param {Array} props The property names to copy.
|
||||
* @param {Object} [object={}] The object to copy properties to.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copyObject(source, props, object) {
|
||||
return copyObjectWith(source, props, object);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is like `copyObject` except that it accepts a function to
|
||||
* customize copied values.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy properties from.
|
||||
* @param {Array} props The property names to copy.
|
||||
* @param {Object} [object={}] The object to copy properties to.
|
||||
* @param {Function} [customizer] The function to customize copied values.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copyObjectWith(source, props, object, customizer) {
|
||||
object || (object = {});
|
||||
|
||||
var index = -1,
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
|
||||
var newValue = customizer
|
||||
? customizer(object[key], source[key], key, object, source)
|
||||
: source[key];
|
||||
|
||||
assignValue(object, key, newValue);
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies own symbol properties of `source` to `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy symbols from.
|
||||
* @param {Object} [object={}] The object to copy symbols to.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copySymbols(source, object) {
|
||||
return copyObject(source, getSymbols(source), object);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the native function at `key` of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @param {string} key The key of the method to get.
|
||||
* @returns {*} Returns the function if it's native, else `undefined`.
|
||||
*/
|
||||
function getNative(object, key) {
|
||||
var value = object == null ? undefined : object[key];
|
||||
return isNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of the own symbol properties of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of symbols.
|
||||
*/
|
||||
var getSymbols = getOwnPropertySymbols || function() {
|
||||
return [];
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {string} Returns the `toStringTag`.
|
||||
*/
|
||||
function getTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps.
|
||||
if ((Map && getTag(new Map) != mapTag) ||
|
||||
(Set && getTag(new Set) != setTag) ||
|
||||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
||||
getTag = function(value) {
|
||||
var result = objectToString.call(value),
|
||||
Ctor = result == objectTag ? value.constructor : null,
|
||||
ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
|
||||
|
||||
if (ctorString) {
|
||||
switch (ctorString) {
|
||||
case mapCtorString: return mapTag;
|
||||
case setCtorString: return setTag;
|
||||
case weakMapCtorString: return weakMapTag;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an array clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to clone.
|
||||
* @returns {Array} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneArray(array) {
|
||||
var length = array.length,
|
||||
result = array.constructor(length);
|
||||
|
||||
// Add properties assigned by `RegExp#exec`.
|
||||
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
||||
result.index = array.index;
|
||||
result.input = array.input;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an object clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneObject(object) {
|
||||
if (isPrototype(object)) {
|
||||
return {};
|
||||
}
|
||||
var Ctor = object.constructor;
|
||||
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an object clone based on its `toStringTag`.
|
||||
*
|
||||
* **Note:** This function only supports cloning values with tags of
|
||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {string} tag The `toStringTag` of the object to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneByTag(object, tag, isDeep) {
|
||||
var Ctor = object.constructor;
|
||||
switch (tag) {
|
||||
case arrayBufferTag:
|
||||
return cloneArrayBuffer(object);
|
||||
|
||||
case boolTag:
|
||||
case dateTag:
|
||||
return new Ctor(+object);
|
||||
|
||||
case float32Tag: case float64Tag:
|
||||
case int8Tag: case int16Tag: case int32Tag:
|
||||
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
||||
return cloneTypedArray(object, isDeep);
|
||||
|
||||
case mapTag:
|
||||
return cloneMap(object);
|
||||
|
||||
case numberTag:
|
||||
case stringTag:
|
||||
return new Ctor(object);
|
||||
|
||||
case regexpTag:
|
||||
return cloneRegExp(object);
|
||||
|
||||
case setTag:
|
||||
return cloneSet(object);
|
||||
|
||||
case symbolTag:
|
||||
return cloneSymbol(object);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is likely a prototype object.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
||||
*/
|
||||
function isPrototype(value) {
|
||||
var Ctor = value && value.constructor,
|
||||
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
||||
|
||||
return value === proto;
|
||||
}
|
||||
var baseClone = require('lodash._baseclone');
|
||||
|
||||
/**
|
||||
* This method is like `_.cloneWith` except that it recursively clones `value`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to recursively clone.
|
||||
* @param {Function} [customizer] The function to customize cloning.
|
||||
* @returns {*} Returns the deep cloned value.
|
||||
* @see _.cloneWith
|
||||
* @example
|
||||
*
|
||||
* function customizer(value) {
|
||||
@@ -701,172 +37,7 @@ function isPrototype(value) {
|
||||
* // => 20
|
||||
*/
|
||||
function cloneDeepWith(value, customizer) {
|
||||
return baseClone(value, true, customizer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to compare.
|
||||
* @param {*} other The other value to compare.
|
||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'user': 'fred' };
|
||||
* var other = { 'user': 'fred' };
|
||||
*
|
||||
* _.eq(object, object);
|
||||
* // => true
|
||||
*
|
||||
* _.eq(object, other);
|
||||
* // => false
|
||||
*
|
||||
* _.eq('a', 'a');
|
||||
* // => true
|
||||
*
|
||||
* _.eq('a', Object('a'));
|
||||
* // => false
|
||||
*
|
||||
* _.eq(NaN, NaN);
|
||||
* // => true
|
||||
*/
|
||||
function eq(value, other) {
|
||||
return value === other || (value !== value && other !== other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as an `Array` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type {Function}
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArray([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isArray(document.body.children);
|
||||
* // => false
|
||||
*
|
||||
* _.isArray('abc');
|
||||
* // => false
|
||||
*
|
||||
* _.isArray(_.noop);
|
||||
* // => false
|
||||
*/
|
||||
var isArray = Array.isArray;
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Function` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isFunction(_);
|
||||
* // => true
|
||||
*
|
||||
* _.isFunction(/abc/);
|
||||
* // => false
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array constructors, and
|
||||
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObject({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObject([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(_.noop);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObject(value) {
|
||||
var type = typeof value;
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||
* and has a `typeof` result of "object".
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObjectLike({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike(_.noop);
|
||||
* // => false
|
||||
*
|
||||
* _.isObjectLike(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a native function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @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 (value == null) {
|
||||
return false;
|
||||
}
|
||||
if (isFunction(value)) {
|
||||
return reIsNative.test(funcToString.call(value));
|
||||
}
|
||||
return isObjectLike(value) &&
|
||||
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
|
||||
return baseClone(value, true, true, customizer);
|
||||
}
|
||||
|
||||
module.exports = cloneDeepWith;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.clonedeepwith",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.2",
|
||||
"description": "The lodash method `_.cloneDeepWith` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -9,16 +9,12 @@
|
||||
"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@iceddev.com> (https://github.com/phated)",
|
||||
"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.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basefor": "^3.0.0",
|
||||
"lodash._root": "^3.0.0",
|
||||
"lodash._stack": "^4.0.0",
|
||||
"lodash.isbuffer": "^4.0.0",
|
||||
"lodash.keys": "^4.0.0"
|
||||
"lodash._baseclone": "~4.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.clonewith v4.2.0
|
||||
# lodash.clonewith v4.3.2
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.cloneWith` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var cloneWith = require('lodash.clonewith');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#cloneWith) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.clonewith) for more details.
|
||||
See the [documentation](https://lodash.com/docs#cloneWith) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.clonewith) for more details.
|
||||
|
||||
@@ -1,691 +1,27 @@
|
||||
/**
|
||||
* lodash 4.2.0 (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/>
|
||||
* 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>
|
||||
*/
|
||||
var Stack = require('lodash._stack'),
|
||||
baseFor = require('lodash._basefor'),
|
||||
isBuffer = require('lodash.isbuffer'),
|
||||
keys = require('lodash.keys'),
|
||||
root = require('lodash._root');
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var argsTag = '[object Arguments]',
|
||||
arrayTag = '[object Array]',
|
||||
boolTag = '[object Boolean]',
|
||||
dateTag = '[object Date]',
|
||||
errorTag = '[object Error]',
|
||||
funcTag = '[object Function]',
|
||||
genTag = '[object GeneratorFunction]',
|
||||
mapTag = '[object Map]',
|
||||
numberTag = '[object Number]',
|
||||
objectTag = '[object Object]',
|
||||
regexpTag = '[object RegExp]',
|
||||
setTag = '[object Set]',
|
||||
stringTag = '[object String]',
|
||||
symbolTag = '[object Symbol]',
|
||||
weakMapTag = '[object WeakMap]';
|
||||
|
||||
var arrayBufferTag = '[object ArrayBuffer]',
|
||||
float32Tag = '[object Float32Array]',
|
||||
float64Tag = '[object Float64Array]',
|
||||
int8Tag = '[object Int8Array]',
|
||||
int16Tag = '[object Int16Array]',
|
||||
int32Tag = '[object Int32Array]',
|
||||
uint8Tag = '[object Uint8Array]',
|
||||
uint8ClampedTag = '[object Uint8ClampedArray]',
|
||||
uint16Tag = '[object Uint16Array]',
|
||||
uint32Tag = '[object Uint32Array]';
|
||||
|
||||
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
/** Used to match `RegExp` flags from their coerced string values. */
|
||||
var reFlags = /\w*$/;
|
||||
|
||||
/** Used to detect host constructors (Safari > 5). */
|
||||
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||||
|
||||
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
||||
var cloneableTags = {};
|
||||
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
||||
cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
|
||||
cloneableTags[dateTag] = cloneableTags[float32Tag] =
|
||||
cloneableTags[float64Tag] = cloneableTags[int8Tag] =
|
||||
cloneableTags[int16Tag] = cloneableTags[int32Tag] =
|
||||
cloneableTags[mapTag] = cloneableTags[numberTag] =
|
||||
cloneableTags[objectTag] = cloneableTags[regexpTag] =
|
||||
cloneableTags[setTag] = cloneableTags[stringTag] =
|
||||
cloneableTags[symbolTag] = cloneableTags[uint8Tag] =
|
||||
cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] =
|
||||
cloneableTags[uint32Tag] = true;
|
||||
cloneableTags[errorTag] = cloneableTags[funcTag] =
|
||||
cloneableTags[weakMapTag] = false;
|
||||
|
||||
/**
|
||||
* Adds the key-value `pair` to `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to modify.
|
||||
* @param {Array} pair The key-value pair to add.
|
||||
* @returns {Object} Returns `map`.
|
||||
*/
|
||||
function addMapEntry(map, pair) {
|
||||
map.set(pair[0], pair[1]);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds `value` to `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to modify.
|
||||
* @param {*} value The value to add.
|
||||
* @returns {Object} Returns `set`.
|
||||
*/
|
||||
function addSetEntry(set, value) {
|
||||
set.add(value);
|
||||
return set;
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `_.forEach` 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 `array`.
|
||||
*/
|
||||
function arrayEach(array, iteratee) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (iteratee(array[index], index, array) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `_.reduce` for arrays without support for
|
||||
* iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {*} [accumulator] The initial value.
|
||||
* @param {boolean} [initAccum] Specify using the first element of `array` as the initial value.
|
||||
* @returns {*} Returns the accumulated value.
|
||||
*/
|
||||
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
if (initAccum && length) {
|
||||
accumulator = array[++index];
|
||||
}
|
||||
while (++index < length) {
|
||||
accumulator = iteratee(accumulator, array[index], index, array);
|
||||
}
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a host object in IE < 9.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
||||
*/
|
||||
function isHostObject(value) {
|
||||
// Many host objects are `Object` objects that can coerce to strings
|
||||
// despite having improperly defined `toString` methods.
|
||||
var result = false;
|
||||
if (value != null && typeof value.toString != 'function') {
|
||||
try {
|
||||
result = !!(value + '');
|
||||
} catch (e) {}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `map` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function mapToArray(map) {
|
||||
var index = -1,
|
||||
result = Array(map.size);
|
||||
|
||||
map.forEach(function(value, key) {
|
||||
result[++index] = [key, value];
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `set` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function setToArray(set) {
|
||||
var index = -1,
|
||||
result = Array(set.size);
|
||||
|
||||
set.forEach(function(value) {
|
||||
result[++index] = value;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.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)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/** Used to detect if a method is native. */
|
||||
var reIsNative = RegExp('^' +
|
||||
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
||||
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
||||
);
|
||||
|
||||
/** Built-in value references. */
|
||||
var Symbol = root.Symbol,
|
||||
Uint8Array = root.Uint8Array,
|
||||
getOwnPropertySymbols = Object.getOwnPropertySymbols,
|
||||
objectCreate = Object.create;
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var Map = getNative(root, 'Map'),
|
||||
Set = getNative(root, 'Set'),
|
||||
WeakMap = getNative(root, 'WeakMap');
|
||||
|
||||
/** Used to detect maps, sets, and weakmaps. */
|
||||
var mapCtorString = Map ? funcToString.call(Map) : '',
|
||||
setCtorString = Set ? funcToString.call(Set) : '',
|
||||
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';
|
||||
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
||||
symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
|
||||
|
||||
/**
|
||||
* 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)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {string} key The key of the property to assign.
|
||||
* @param {*} value The value to assign.
|
||||
*/
|
||||
function assignValue(object, key, value) {
|
||||
var objValue = object[key];
|
||||
if ((!eq(objValue, value) ||
|
||||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) ||
|
||||
(value === undefined && !(key in object))) {
|
||||
object[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.assign` without support for multiple sources
|
||||
* or `customizer` functions.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The destination object.
|
||||
* @param {Object} source The source object.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseAssign(object, source) {
|
||||
return object && copyObject(source, keys(source), object);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
||||
* traversed objects.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @param {Function} [customizer] The function to customize cloning.
|
||||
* @param {string} [key] The key of `value`.
|
||||
* @param {Object} [object] The parent object of `value`.
|
||||
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
||||
* @returns {*} Returns the cloned value.
|
||||
*/
|
||||
function baseClone(value, isDeep, customizer, key, object, stack) {
|
||||
var result;
|
||||
if (customizer) {
|
||||
result = object ? customizer(value, key, object, stack) : customizer(value);
|
||||
}
|
||||
if (result !== undefined) {
|
||||
return result;
|
||||
}
|
||||
if (!isObject(value)) {
|
||||
return value;
|
||||
}
|
||||
var isArr = isArray(value);
|
||||
if (isArr) {
|
||||
result = initCloneArray(value);
|
||||
if (!isDeep) {
|
||||
return copyArray(value, result);
|
||||
}
|
||||
} else {
|
||||
var tag = getTag(value),
|
||||
isFunc = tag == funcTag || tag == genTag;
|
||||
|
||||
if (isBuffer(value)) {
|
||||
return cloneBuffer(value, isDeep);
|
||||
}
|
||||
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
||||
if (isHostObject(value)) {
|
||||
return object ? value : {};
|
||||
}
|
||||
result = initCloneObject(isFunc ? {} : value);
|
||||
if (!isDeep) {
|
||||
return copySymbols(value, baseAssign(result, value));
|
||||
}
|
||||
} else {
|
||||
return cloneableTags[tag]
|
||||
? initCloneByTag(value, tag, isDeep)
|
||||
: (object ? value : {});
|
||||
}
|
||||
}
|
||||
// Check for circular references and return its corresponding clone.
|
||||
stack || (stack = new Stack);
|
||||
var stacked = stack.get(value);
|
||||
if (stacked) {
|
||||
return stacked;
|
||||
}
|
||||
stack.set(value, result);
|
||||
|
||||
// Recursively populate clone (susceptible to call stack limits).
|
||||
(isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
|
||||
assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack));
|
||||
});
|
||||
return isArr ? result : copySymbols(value, result);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.create` without support for assigning
|
||||
* properties to the created object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} prototype The object to inherit from.
|
||||
* @returns {Object} Returns the new object.
|
||||
*/
|
||||
function baseCreate(proto) {
|
||||
return isObject(proto) ? objectCreate(proto) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForOwn(object, iteratee) {
|
||||
return object && baseFor(object, iteratee, keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `buffer`.
|
||||
*
|
||||
* @private
|
||||
* @param {Buffer} buffer The buffer to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Buffer} Returns the cloned buffer.
|
||||
*/
|
||||
function cloneBuffer(buffer, isDeep) {
|
||||
if (isDeep) {
|
||||
return buffer.slice();
|
||||
}
|
||||
var Ctor = buffer.constructor,
|
||||
result = new Ctor(buffer.length);
|
||||
|
||||
buffer.copy(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `arrayBuffer`.
|
||||
*
|
||||
* @private
|
||||
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
||||
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
||||
*/
|
||||
function cloneArrayBuffer(arrayBuffer) {
|
||||
var Ctor = arrayBuffer.constructor,
|
||||
result = new Ctor(arrayBuffer.byteLength),
|
||||
view = new Uint8Array(result);
|
||||
|
||||
view.set(new Uint8Array(arrayBuffer));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to clone.
|
||||
* @returns {Object} Returns the cloned map.
|
||||
*/
|
||||
function cloneMap(map) {
|
||||
var Ctor = map.constructor;
|
||||
return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `regexp`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} regexp The regexp to clone.
|
||||
* @returns {Object} Returns the cloned regexp.
|
||||
*/
|
||||
function cloneRegExp(regexp) {
|
||||
var Ctor = regexp.constructor,
|
||||
result = new Ctor(regexp.source, reFlags.exec(regexp));
|
||||
|
||||
result.lastIndex = regexp.lastIndex;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to clone.
|
||||
* @returns {Object} Returns the cloned set.
|
||||
*/
|
||||
function cloneSet(set) {
|
||||
var Ctor = set.constructor;
|
||||
return arrayReduce(setToArray(set), addSetEntry, new Ctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of the `symbol` object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} symbol The symbol object to clone.
|
||||
* @returns {Object} Returns the cloned symbol object.
|
||||
*/
|
||||
function cloneSymbol(symbol) {
|
||||
return Symbol ? Object(symbolValueOf.call(symbol)) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `typedArray`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} typedArray The typed array to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the cloned typed array.
|
||||
*/
|
||||
function cloneTypedArray(typedArray, isDeep) {
|
||||
var arrayBuffer = typedArray.buffer,
|
||||
buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer,
|
||||
Ctor = typedArray.constructor;
|
||||
|
||||
return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies properties of `source` to `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy properties from.
|
||||
* @param {Array} props The property names to copy.
|
||||
* @param {Object} [object={}] The object to copy properties to.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copyObject(source, props, object) {
|
||||
return copyObjectWith(source, props, object);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is like `copyObject` except that it accepts a function to
|
||||
* customize copied values.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy properties from.
|
||||
* @param {Array} props The property names to copy.
|
||||
* @param {Object} [object={}] The object to copy properties to.
|
||||
* @param {Function} [customizer] The function to customize copied values.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copyObjectWith(source, props, object, customizer) {
|
||||
object || (object = {});
|
||||
|
||||
var index = -1,
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
|
||||
var newValue = customizer
|
||||
? customizer(object[key], source[key], key, object, source)
|
||||
: source[key];
|
||||
|
||||
assignValue(object, key, newValue);
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies own symbol properties of `source` to `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy symbols from.
|
||||
* @param {Object} [object={}] The object to copy symbols to.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copySymbols(source, object) {
|
||||
return copyObject(source, getSymbols(source), object);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the native function at `key` of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @param {string} key The key of the method to get.
|
||||
* @returns {*} Returns the function if it's native, else `undefined`.
|
||||
*/
|
||||
function getNative(object, key) {
|
||||
var value = object == null ? undefined : object[key];
|
||||
return isNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of the own symbol properties of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of symbols.
|
||||
*/
|
||||
var getSymbols = getOwnPropertySymbols || function() {
|
||||
return [];
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {string} Returns the `toStringTag`.
|
||||
*/
|
||||
function getTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps.
|
||||
if ((Map && getTag(new Map) != mapTag) ||
|
||||
(Set && getTag(new Set) != setTag) ||
|
||||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
||||
getTag = function(value) {
|
||||
var result = objectToString.call(value),
|
||||
Ctor = result == objectTag ? value.constructor : null,
|
||||
ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
|
||||
|
||||
if (ctorString) {
|
||||
switch (ctorString) {
|
||||
case mapCtorString: return mapTag;
|
||||
case setCtorString: return setTag;
|
||||
case weakMapCtorString: return weakMapTag;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an array clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to clone.
|
||||
* @returns {Array} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneArray(array) {
|
||||
var length = array.length,
|
||||
result = array.constructor(length);
|
||||
|
||||
// Add properties assigned by `RegExp#exec`.
|
||||
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
||||
result.index = array.index;
|
||||
result.input = array.input;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an object clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneObject(object) {
|
||||
if (isPrototype(object)) {
|
||||
return {};
|
||||
}
|
||||
var Ctor = object.constructor;
|
||||
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an object clone based on its `toStringTag`.
|
||||
*
|
||||
* **Note:** This function only supports cloning values with tags of
|
||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {string} tag The `toStringTag` of the object to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneByTag(object, tag, isDeep) {
|
||||
var Ctor = object.constructor;
|
||||
switch (tag) {
|
||||
case arrayBufferTag:
|
||||
return cloneArrayBuffer(object);
|
||||
|
||||
case boolTag:
|
||||
case dateTag:
|
||||
return new Ctor(+object);
|
||||
|
||||
case float32Tag: case float64Tag:
|
||||
case int8Tag: case int16Tag: case int32Tag:
|
||||
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
||||
return cloneTypedArray(object, isDeep);
|
||||
|
||||
case mapTag:
|
||||
return cloneMap(object);
|
||||
|
||||
case numberTag:
|
||||
case stringTag:
|
||||
return new Ctor(object);
|
||||
|
||||
case regexpTag:
|
||||
return cloneRegExp(object);
|
||||
|
||||
case setTag:
|
||||
return cloneSet(object);
|
||||
|
||||
case symbolTag:
|
||||
return cloneSymbol(object);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is likely a prototype object.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
||||
*/
|
||||
function isPrototype(value) {
|
||||
var Ctor = value && value.constructor,
|
||||
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
||||
|
||||
return value === proto;
|
||||
}
|
||||
var baseClone = require('lodash._baseclone');
|
||||
|
||||
/**
|
||||
* This method is like `_.clone` except that it accepts `customizer` which
|
||||
* is invoked to produce the cloned value. If `customizer` returns `undefined`
|
||||
* is invoked to produce the cloned value. If `customizer` returns `undefined`,
|
||||
* cloning is handled by the method instead. The `customizer` is invoked with
|
||||
* up to four arguments; (value [, index|key, object, stack]).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to clone.
|
||||
* @param {Function} [customizer] The function to customize cloning.
|
||||
* @returns {*} Returns the cloned value.
|
||||
* @see _.cloneDeepWith
|
||||
* @example
|
||||
*
|
||||
* function customizer(value) {
|
||||
@@ -704,172 +40,7 @@ function isPrototype(value) {
|
||||
* // => 0
|
||||
*/
|
||||
function cloneWith(value, customizer) {
|
||||
return baseClone(value, false, customizer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to compare.
|
||||
* @param {*} other The other value to compare.
|
||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'user': 'fred' };
|
||||
* var other = { 'user': 'fred' };
|
||||
*
|
||||
* _.eq(object, object);
|
||||
* // => true
|
||||
*
|
||||
* _.eq(object, other);
|
||||
* // => false
|
||||
*
|
||||
* _.eq('a', 'a');
|
||||
* // => true
|
||||
*
|
||||
* _.eq('a', Object('a'));
|
||||
* // => false
|
||||
*
|
||||
* _.eq(NaN, NaN);
|
||||
* // => true
|
||||
*/
|
||||
function eq(value, other) {
|
||||
return value === other || (value !== value && other !== other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as an `Array` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type {Function}
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArray([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isArray(document.body.children);
|
||||
* // => false
|
||||
*
|
||||
* _.isArray('abc');
|
||||
* // => false
|
||||
*
|
||||
* _.isArray(_.noop);
|
||||
* // => false
|
||||
*/
|
||||
var isArray = Array.isArray;
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Function` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isFunction(_);
|
||||
* // => true
|
||||
*
|
||||
* _.isFunction(/abc/);
|
||||
* // => false
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array constructors, and
|
||||
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObject({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObject([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(_.noop);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObject(value) {
|
||||
var type = typeof value;
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||
* and has a `typeof` result of "object".
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObjectLike({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike(_.noop);
|
||||
* // => false
|
||||
*
|
||||
* _.isObjectLike(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a native function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @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 (value == null) {
|
||||
return false;
|
||||
}
|
||||
if (isFunction(value)) {
|
||||
return reIsNative.test(funcToString.call(value));
|
||||
}
|
||||
return isObjectLike(value) &&
|
||||
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
|
||||
return baseClone(value, false, true, customizer);
|
||||
}
|
||||
|
||||
module.exports = cloneWith;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.clonewith",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.2",
|
||||
"description": "The lodash method `_.cloneWith` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -9,16 +9,12 @@
|
||||
"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@iceddev.com> (https://github.com/phated)",
|
||||
"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.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basefor": "^3.0.0",
|
||||
"lodash._root": "^3.0.0",
|
||||
"lodash._stack": "^4.0.0",
|
||||
"lodash.isbuffer": "^4.0.0",
|
||||
"lodash.keys": "^4.0.0"
|
||||
"lodash._baseclone": "~4.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.concat v4.2.0
|
||||
# lodash.concat v4.3.1
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.concat` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var concat = require('lodash.concat');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#concat) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.concat) for more details.
|
||||
See the [documentation](https://lodash.com/docs#concat) or [package source](https://github.com/lodash/lodash/blob/4.3.1-npm-packages/lodash.concat) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 4.2.0 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
@@ -9,27 +9,22 @@
|
||||
var baseFlatten = require('lodash._baseflatten');
|
||||
|
||||
/**
|
||||
* Creates a new array concatenating `array` with `other`.
|
||||
* Appends the elements of `values` to `array`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The first array to concatenate.
|
||||
* @param {Array} other The second array to concatenate.
|
||||
* @returns {Array} Returns the new concatenated array.
|
||||
* @param {Array} array The array to modify.
|
||||
* @param {Array} values The values to append.
|
||||
* @returns {Array} Returns `array`.
|
||||
*/
|
||||
function arrayConcat(array, other) {
|
||||
function arrayPush(array, values) {
|
||||
var index = -1,
|
||||
length = array.length,
|
||||
othIndex = -1,
|
||||
othLength = other.length,
|
||||
result = Array(length + othLength);
|
||||
length = values.length,
|
||||
offset = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
result[index] = array[index];
|
||||
array[offset + index] = values[index];
|
||||
}
|
||||
while (++othIndex < othLength) {
|
||||
result[index++] = other[othIndex];
|
||||
}
|
||||
return result;
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,57 +70,16 @@ function copyArray(source, array) {
|
||||
*/
|
||||
function concat() {
|
||||
var length = arguments.length,
|
||||
array = castArray(arguments[0]);
|
||||
args = Array(length ? length - 1 : 0),
|
||||
array = arguments[0],
|
||||
index = length;
|
||||
|
||||
if (length < 2) {
|
||||
return length ? copyArray(array) : [];
|
||||
while (index--) {
|
||||
args[index - 1] = arguments[index];
|
||||
}
|
||||
var args = Array(length - 1);
|
||||
while (length--) {
|
||||
args[length - 1] = arguments[length];
|
||||
}
|
||||
return arrayConcat(array, baseFlatten(args, 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `value` as an array if it's not one.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.4.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {Array} Returns the cast array.
|
||||
* @example
|
||||
*
|
||||
* _.castArray(1);
|
||||
* // => [1]
|
||||
*
|
||||
* _.castArray({ 'a': 1 });
|
||||
* // => [{ 'a': 1 }]
|
||||
*
|
||||
* _.castArray('abc');
|
||||
* // => ['abc']
|
||||
*
|
||||
* _.castArray(null);
|
||||
* // => [null]
|
||||
*
|
||||
* _.castArray(undefined);
|
||||
* // => [undefined]
|
||||
*
|
||||
* _.castArray();
|
||||
* // => []
|
||||
*
|
||||
* var array = [1, 2, 3];
|
||||
* console.log(_.castArray(array) === array);
|
||||
* // => true
|
||||
*/
|
||||
function castArray() {
|
||||
if (!arguments.length) {
|
||||
return [];
|
||||
}
|
||||
var value = arguments[0];
|
||||
return isArray(value) ? value : [value];
|
||||
return length
|
||||
? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1))
|
||||
: [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.concat",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.1",
|
||||
"description": "The lodash method `_.concat` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -15,6 +15,6 @@
|
||||
"repository": "lodash/lodash",
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseflatten": "~4.1.0"
|
||||
"lodash._baseflatten": "~4.2.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.cond v4.2.1
|
||||
# lodash.cond v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.cond` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var cond = require('lodash.cond');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#cond) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.cond) for more details.
|
||||
See the [documentation](https://lodash.com/docs#cond) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.cond) for more details.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* lodash 4.2.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 baseIteratee = require('lodash._baseiteratee'),
|
||||
rest = require('lodash.rest');
|
||||
@@ -19,7 +19,7 @@ var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
* @private
|
||||
* @param {Function} func The function to invoke.
|
||||
* @param {*} thisArg The `this` binding of `func`.
|
||||
* @param {...*} args The arguments to invoke `func` with.
|
||||
* @param {Array} args The arguments to invoke `func` with.
|
||||
* @returns {*} Returns the result of `func`.
|
||||
*/
|
||||
function apply(func, thisArg, args) {
|
||||
@@ -54,16 +54,17 @@ function arrayMap(array, iteratee) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that iterates over `pairs` invoking the corresponding
|
||||
* Creates a function that iterates over `pairs` and invokes the corresponding
|
||||
* function of the first predicate to return truthy. The predicate-function
|
||||
* pairs are invoked with the `this` binding and arguments of the created
|
||||
* function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Util
|
||||
* @param {Array} pairs The predicate-function pairs.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @returns {Function} Returns the new composite function.
|
||||
* @example
|
||||
*
|
||||
* var func = _.cond([
|
||||
@@ -82,13 +83,14 @@ function arrayMap(array, iteratee) {
|
||||
* // => 'no match'
|
||||
*/
|
||||
function cond(pairs) {
|
||||
var length = pairs ? pairs.length : 0;
|
||||
var length = pairs ? pairs.length : 0,
|
||||
toIteratee = baseIteratee;
|
||||
|
||||
pairs = !length ? [] : arrayMap(pairs, function(pair) {
|
||||
if (typeof pair[1] != 'function') {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
return [baseIteratee(pair[0]), pair[1]];
|
||||
return [toIteratee(pair[0]), pair[1]];
|
||||
});
|
||||
|
||||
return rest(function(args) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.cond",
|
||||
"version": "4.2.1",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.cond` 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._baseiteratee": "~4.5.0",
|
||||
"lodash._baseiteratee": "~4.6.0",
|
||||
"lodash.rest": "^4.0.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.conforms v4.2.0
|
||||
# lodash.conforms v4.3.2
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.conforms` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var conforms = require('lodash.conforms');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#conforms) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.conforms) for more details.
|
||||
See the [documentation](https://lodash.com/docs#conforms) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.conforms) for more details.
|
||||
|
||||
@@ -1,339 +1,20 @@
|
||||
/**
|
||||
* lodash 4.2.0 (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 Stack = require('lodash._stack'),
|
||||
baseFor = require('lodash._basefor'),
|
||||
isBuffer = require('lodash.isbuffer'),
|
||||
keys = require('lodash.keys'),
|
||||
root = require('lodash._root');
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var argsTag = '[object Arguments]',
|
||||
arrayTag = '[object Array]',
|
||||
boolTag = '[object Boolean]',
|
||||
dateTag = '[object Date]',
|
||||
errorTag = '[object Error]',
|
||||
funcTag = '[object Function]',
|
||||
genTag = '[object GeneratorFunction]',
|
||||
mapTag = '[object Map]',
|
||||
numberTag = '[object Number]',
|
||||
objectTag = '[object Object]',
|
||||
regexpTag = '[object RegExp]',
|
||||
setTag = '[object Set]',
|
||||
stringTag = '[object String]',
|
||||
symbolTag = '[object Symbol]',
|
||||
weakMapTag = '[object WeakMap]';
|
||||
|
||||
var arrayBufferTag = '[object ArrayBuffer]',
|
||||
float32Tag = '[object Float32Array]',
|
||||
float64Tag = '[object Float64Array]',
|
||||
int8Tag = '[object Int8Array]',
|
||||
int16Tag = '[object Int16Array]',
|
||||
int32Tag = '[object Int32Array]',
|
||||
uint8Tag = '[object Uint8Array]',
|
||||
uint8ClampedTag = '[object Uint8ClampedArray]',
|
||||
uint16Tag = '[object Uint16Array]',
|
||||
uint32Tag = '[object Uint32Array]';
|
||||
|
||||
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
/** Used to match `RegExp` flags from their coerced string values. */
|
||||
var reFlags = /\w*$/;
|
||||
|
||||
/** Used to detect host constructors (Safari > 5). */
|
||||
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||||
|
||||
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
||||
var cloneableTags = {};
|
||||
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
||||
cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
|
||||
cloneableTags[dateTag] = cloneableTags[float32Tag] =
|
||||
cloneableTags[float64Tag] = cloneableTags[int8Tag] =
|
||||
cloneableTags[int16Tag] = cloneableTags[int32Tag] =
|
||||
cloneableTags[mapTag] = cloneableTags[numberTag] =
|
||||
cloneableTags[objectTag] = cloneableTags[regexpTag] =
|
||||
cloneableTags[setTag] = cloneableTags[stringTag] =
|
||||
cloneableTags[symbolTag] = cloneableTags[uint8Tag] =
|
||||
cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] =
|
||||
cloneableTags[uint32Tag] = true;
|
||||
cloneableTags[errorTag] = cloneableTags[funcTag] =
|
||||
cloneableTags[weakMapTag] = false;
|
||||
|
||||
/**
|
||||
* Adds the key-value `pair` to `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to modify.
|
||||
* @param {Array} pair The key-value pair to add.
|
||||
* @returns {Object} Returns `map`.
|
||||
*/
|
||||
function addMapEntry(map, pair) {
|
||||
map.set(pair[0], pair[1]);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds `value` to `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to modify.
|
||||
* @param {*} value The value to add.
|
||||
* @returns {Object} Returns `set`.
|
||||
*/
|
||||
function addSetEntry(set, value) {
|
||||
set.add(value);
|
||||
return set;
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `_.forEach` 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 `array`.
|
||||
*/
|
||||
function arrayEach(array, iteratee) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (iteratee(array[index], index, array) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `_.reduce` for arrays without support for
|
||||
* iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {*} [accumulator] The initial value.
|
||||
* @param {boolean} [initAccum] Specify using the first element of `array` as the initial value.
|
||||
* @returns {*} Returns the accumulated value.
|
||||
*/
|
||||
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
if (initAccum && length) {
|
||||
accumulator = array[++index];
|
||||
}
|
||||
while (++index < length) {
|
||||
accumulator = iteratee(accumulator, array[index], index, array);
|
||||
}
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a host object in IE < 9.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
||||
*/
|
||||
function isHostObject(value) {
|
||||
// Many host objects are `Object` objects that can coerce to strings
|
||||
// despite having improperly defined `toString` methods.
|
||||
var result = false;
|
||||
if (value != null && typeof value.toString != 'function') {
|
||||
try {
|
||||
result = !!(value + '');
|
||||
} catch (e) {}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `map` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function mapToArray(map) {
|
||||
var index = -1,
|
||||
result = Array(map.size);
|
||||
|
||||
map.forEach(function(value, key) {
|
||||
result[++index] = [key, value];
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `set` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function setToArray(set) {
|
||||
var index = -1,
|
||||
result = Array(set.size);
|
||||
|
||||
set.forEach(function(value) {
|
||||
result[++index] = value;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.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)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/** Used to detect if a method is native. */
|
||||
var reIsNative = RegExp('^' +
|
||||
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
||||
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
||||
);
|
||||
|
||||
/** Built-in value references. */
|
||||
var Symbol = root.Symbol,
|
||||
Uint8Array = root.Uint8Array,
|
||||
getOwnPropertySymbols = Object.getOwnPropertySymbols,
|
||||
objectCreate = Object.create;
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var Map = getNative(root, 'Map'),
|
||||
Set = getNative(root, 'Set'),
|
||||
WeakMap = getNative(root, 'WeakMap');
|
||||
|
||||
/** Used to detect maps, sets, and weakmaps. */
|
||||
var mapCtorString = Map ? funcToString.call(Map) : '',
|
||||
setCtorString = Set ? funcToString.call(Set) : '',
|
||||
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';
|
||||
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
||||
symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
|
||||
|
||||
/**
|
||||
* 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)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {string} key The key of the property to assign.
|
||||
* @param {*} value The value to assign.
|
||||
*/
|
||||
function assignValue(object, key, value) {
|
||||
var objValue = object[key];
|
||||
if ((!eq(objValue, value) ||
|
||||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) ||
|
||||
(value === undefined && !(key in object))) {
|
||||
object[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.assign` without support for multiple sources
|
||||
* or `customizer` functions.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The destination object.
|
||||
* @param {Object} source The source object.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseAssign(object, source) {
|
||||
return object && copyObject(source, keys(source), object);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
||||
* traversed objects.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @param {Function} [customizer] The function to customize cloning.
|
||||
* @param {string} [key] The key of `value`.
|
||||
* @param {Object} [object] The parent object of `value`.
|
||||
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
||||
* @returns {*} Returns the cloned value.
|
||||
*/
|
||||
function baseClone(value, isDeep, customizer, key, object, stack) {
|
||||
var result;
|
||||
if (customizer) {
|
||||
result = object ? customizer(value, key, object, stack) : customizer(value);
|
||||
}
|
||||
if (result !== undefined) {
|
||||
return result;
|
||||
}
|
||||
if (!isObject(value)) {
|
||||
return value;
|
||||
}
|
||||
var isArr = isArray(value);
|
||||
if (isArr) {
|
||||
result = initCloneArray(value);
|
||||
if (!isDeep) {
|
||||
return copyArray(value, result);
|
||||
}
|
||||
} else {
|
||||
var tag = getTag(value),
|
||||
isFunc = tag == funcTag || tag == genTag;
|
||||
|
||||
if (isBuffer(value)) {
|
||||
return cloneBuffer(value, isDeep);
|
||||
}
|
||||
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
||||
if (isHostObject(value)) {
|
||||
return object ? value : {};
|
||||
}
|
||||
result = initCloneObject(isFunc ? {} : value);
|
||||
if (!isDeep) {
|
||||
return copySymbols(value, baseAssign(result, value));
|
||||
}
|
||||
} else {
|
||||
return cloneableTags[tag]
|
||||
? initCloneByTag(value, tag, isDeep)
|
||||
: (object ? value : {});
|
||||
}
|
||||
}
|
||||
// Check for circular references and return its corresponding clone.
|
||||
stack || (stack = new Stack);
|
||||
var stacked = stack.get(value);
|
||||
if (stacked) {
|
||||
return stacked;
|
||||
}
|
||||
stack.set(value, result);
|
||||
|
||||
// Recursively populate clone (susceptible to call stack limits).
|
||||
(isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
|
||||
assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack));
|
||||
});
|
||||
return isArr ? result : copySymbols(value, result);
|
||||
}
|
||||
var baseClone = require('lodash._baseclone'),
|
||||
keys = require('lodash.keys');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.conforms` which doesn't clone `source`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object of property predicates to conform to.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @returns {Function} Returns the new spec function.
|
||||
*/
|
||||
function baseConforms(source) {
|
||||
var props = keys(source),
|
||||
@@ -349,7 +30,8 @@ function baseConforms(source) {
|
||||
predicate = source[key],
|
||||
value = object[key];
|
||||
|
||||
if ((value === undefined && !(key in Object(object))) || !predicate(value)) {
|
||||
if ((value === undefined &&
|
||||
!(key in Object(object))) || !predicate(value)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -357,517 +39,6 @@ function baseConforms(source) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.create` without support for assigning
|
||||
* properties to the created object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} prototype The object to inherit from.
|
||||
* @returns {Object} Returns the new object.
|
||||
*/
|
||||
function baseCreate(proto) {
|
||||
return isObject(proto) ? objectCreate(proto) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForOwn(object, iteratee) {
|
||||
return object && baseFor(object, iteratee, keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `buffer`.
|
||||
*
|
||||
* @private
|
||||
* @param {Buffer} buffer The buffer to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Buffer} Returns the cloned buffer.
|
||||
*/
|
||||
function cloneBuffer(buffer, isDeep) {
|
||||
if (isDeep) {
|
||||
return buffer.slice();
|
||||
}
|
||||
var Ctor = buffer.constructor,
|
||||
result = new Ctor(buffer.length);
|
||||
|
||||
buffer.copy(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `arrayBuffer`.
|
||||
*
|
||||
* @private
|
||||
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
||||
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
||||
*/
|
||||
function cloneArrayBuffer(arrayBuffer) {
|
||||
var Ctor = arrayBuffer.constructor,
|
||||
result = new Ctor(arrayBuffer.byteLength),
|
||||
view = new Uint8Array(result);
|
||||
|
||||
view.set(new Uint8Array(arrayBuffer));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to clone.
|
||||
* @returns {Object} Returns the cloned map.
|
||||
*/
|
||||
function cloneMap(map) {
|
||||
var Ctor = map.constructor;
|
||||
return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `regexp`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} regexp The regexp to clone.
|
||||
* @returns {Object} Returns the cloned regexp.
|
||||
*/
|
||||
function cloneRegExp(regexp) {
|
||||
var Ctor = regexp.constructor,
|
||||
result = new Ctor(regexp.source, reFlags.exec(regexp));
|
||||
|
||||
result.lastIndex = regexp.lastIndex;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to clone.
|
||||
* @returns {Object} Returns the cloned set.
|
||||
*/
|
||||
function cloneSet(set) {
|
||||
var Ctor = set.constructor;
|
||||
return arrayReduce(setToArray(set), addSetEntry, new Ctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of the `symbol` object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} symbol The symbol object to clone.
|
||||
* @returns {Object} Returns the cloned symbol object.
|
||||
*/
|
||||
function cloneSymbol(symbol) {
|
||||
return Symbol ? Object(symbolValueOf.call(symbol)) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `typedArray`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} typedArray The typed array to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the cloned typed array.
|
||||
*/
|
||||
function cloneTypedArray(typedArray, isDeep) {
|
||||
var arrayBuffer = typedArray.buffer,
|
||||
buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer,
|
||||
Ctor = typedArray.constructor;
|
||||
|
||||
return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies properties of `source` to `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy properties from.
|
||||
* @param {Array} props The property names to copy.
|
||||
* @param {Object} [object={}] The object to copy properties to.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copyObject(source, props, object) {
|
||||
return copyObjectWith(source, props, object);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is like `copyObject` except that it accepts a function to
|
||||
* customize copied values.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy properties from.
|
||||
* @param {Array} props The property names to copy.
|
||||
* @param {Object} [object={}] The object to copy properties to.
|
||||
* @param {Function} [customizer] The function to customize copied values.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copyObjectWith(source, props, object, customizer) {
|
||||
object || (object = {});
|
||||
|
||||
var index = -1,
|
||||
length = props.length;
|
||||
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
|
||||
var newValue = customizer
|
||||
? customizer(object[key], source[key], key, object, source)
|
||||
: source[key];
|
||||
|
||||
assignValue(object, key, newValue);
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies own symbol properties of `source` to `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy symbols from.
|
||||
* @param {Object} [object={}] The object to copy symbols to.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copySymbols(source, object) {
|
||||
return copyObject(source, getSymbols(source), object);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the native function at `key` of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @param {string} key The key of the method to get.
|
||||
* @returns {*} Returns the function if it's native, else `undefined`.
|
||||
*/
|
||||
function getNative(object, key) {
|
||||
var value = object == null ? undefined : object[key];
|
||||
return isNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of the own symbol properties of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of symbols.
|
||||
*/
|
||||
var getSymbols = getOwnPropertySymbols || function() {
|
||||
return [];
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {string} Returns the `toStringTag`.
|
||||
*/
|
||||
function getTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps.
|
||||
if ((Map && getTag(new Map) != mapTag) ||
|
||||
(Set && getTag(new Set) != setTag) ||
|
||||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
||||
getTag = function(value) {
|
||||
var result = objectToString.call(value),
|
||||
Ctor = result == objectTag ? value.constructor : null,
|
||||
ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
|
||||
|
||||
if (ctorString) {
|
||||
switch (ctorString) {
|
||||
case mapCtorString: return mapTag;
|
||||
case setCtorString: return setTag;
|
||||
case weakMapCtorString: return weakMapTag;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an array clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to clone.
|
||||
* @returns {Array} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneArray(array) {
|
||||
var length = array.length,
|
||||
result = array.constructor(length);
|
||||
|
||||
// Add properties assigned by `RegExp#exec`.
|
||||
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
||||
result.index = array.index;
|
||||
result.input = array.input;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an object clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneObject(object) {
|
||||
if (isPrototype(object)) {
|
||||
return {};
|
||||
}
|
||||
var Ctor = object.constructor;
|
||||
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an object clone based on its `toStringTag`.
|
||||
*
|
||||
* **Note:** This function only supports cloning values with tags of
|
||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {string} tag The `toStringTag` of the object to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneByTag(object, tag, isDeep) {
|
||||
var Ctor = object.constructor;
|
||||
switch (tag) {
|
||||
case arrayBufferTag:
|
||||
return cloneArrayBuffer(object);
|
||||
|
||||
case boolTag:
|
||||
case dateTag:
|
||||
return new Ctor(+object);
|
||||
|
||||
case float32Tag: case float64Tag:
|
||||
case int8Tag: case int16Tag: case int32Tag:
|
||||
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
||||
return cloneTypedArray(object, isDeep);
|
||||
|
||||
case mapTag:
|
||||
return cloneMap(object);
|
||||
|
||||
case numberTag:
|
||||
case stringTag:
|
||||
return new Ctor(object);
|
||||
|
||||
case regexpTag:
|
||||
return cloneRegExp(object);
|
||||
|
||||
case setTag:
|
||||
return cloneSet(object);
|
||||
|
||||
case symbolTag:
|
||||
return cloneSymbol(object);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is likely a prototype object.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
||||
*/
|
||||
function isPrototype(value) {
|
||||
var Ctor = value && value.constructor,
|
||||
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
||||
|
||||
return value === proto;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to compare.
|
||||
* @param {*} other The other value to compare.
|
||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'user': 'fred' };
|
||||
* var other = { 'user': 'fred' };
|
||||
*
|
||||
* _.eq(object, object);
|
||||
* // => true
|
||||
*
|
||||
* _.eq(object, other);
|
||||
* // => false
|
||||
*
|
||||
* _.eq('a', 'a');
|
||||
* // => true
|
||||
*
|
||||
* _.eq('a', Object('a'));
|
||||
* // => false
|
||||
*
|
||||
* _.eq(NaN, NaN);
|
||||
* // => true
|
||||
*/
|
||||
function eq(value, other) {
|
||||
return value === other || (value !== value && other !== other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as an `Array` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type {Function}
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArray([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isArray(document.body.children);
|
||||
* // => false
|
||||
*
|
||||
* _.isArray('abc');
|
||||
* // => false
|
||||
*
|
||||
* _.isArray(_.noop);
|
||||
* // => false
|
||||
*/
|
||||
var isArray = Array.isArray;
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Function` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isFunction(_);
|
||||
* // => true
|
||||
*
|
||||
* _.isFunction(/abc/);
|
||||
* // => false
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array constructors, and
|
||||
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObject({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObject([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(_.noop);
|
||||
* // => true
|
||||
*
|
||||
* _.isObject(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObject(value) {
|
||||
var type = typeof value;
|
||||
return !!value && (type == 'object' || type == 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
||||
* and has a `typeof` result of "object".
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isObjectLike({});
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike([1, 2, 3]);
|
||||
* // => true
|
||||
*
|
||||
* _.isObjectLike(_.noop);
|
||||
* // => false
|
||||
*
|
||||
* _.isObjectLike(null);
|
||||
* // => false
|
||||
*/
|
||||
function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a native function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @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 (value == null) {
|
||||
return false;
|
||||
}
|
||||
if (isFunction(value)) {
|
||||
return reIsNative.test(funcToString.call(value));
|
||||
}
|
||||
return isObjectLike(value) &&
|
||||
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes the predicate properties of `source` with
|
||||
* the corresponding property values of a given object, returning `true` if
|
||||
@@ -875,9 +46,10 @@ function isNative(value) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Util
|
||||
* @param {Object} source The object of property predicates to conform to.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @returns {Function} Returns the new spec function.
|
||||
* @example
|
||||
*
|
||||
* var users = [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.conforms",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.2",
|
||||
"description": "The lodash method `_.conforms` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -9,16 +9,13 @@
|
||||
"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@iceddev.com> (https://github.com/phated)",
|
||||
"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.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basefor": "^3.0.0",
|
||||
"lodash._root": "^3.0.0",
|
||||
"lodash._stack": "^4.0.0",
|
||||
"lodash.isbuffer": "^4.0.0",
|
||||
"lodash._baseclone": "~4.5.0",
|
||||
"lodash.keys": "^4.0.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.countby v4.2.1
|
||||
# lodash.countby v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.countBy` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var countBy = require('lodash.countby');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#countBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.countby) for more details.
|
||||
See the [documentation](https://lodash.com/docs#countBy) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.countby) for more details.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* lodash 4.2.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.0 (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 baseEach = require('lodash._baseeach'),
|
||||
baseIteratee = require('lodash._baseiteratee');
|
||||
@@ -73,15 +73,17 @@ function createAggregator(setter, initializer) {
|
||||
|
||||
/**
|
||||
* Creates an object composed of keys generated from the results of running
|
||||
* each element of `collection` through `iteratee`. The corresponding value
|
||||
* of each key is the number of times the key was returned by `iteratee`.
|
||||
* The iteratee is invoked with one argument: (value).
|
||||
* each element of `collection` thru `iteratee`. The corresponding value of
|
||||
* each key is the number of times the key was returned by `iteratee`. The
|
||||
* iteratee is invoked with one argument: (value).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.5.0
|
||||
* @category Collection
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function|Object|string} [iteratee=_.identity] The iteratee to transform keys.
|
||||
* @param {Array|Function|Object|string} [iteratee=_.identity]
|
||||
* The iteratee to transform keys.
|
||||
* @returns {Object} Returns the composed aggregate object.
|
||||
* @example
|
||||
*
|
||||
@@ -100,10 +102,12 @@ var countBy = createAggregator(function(result, value, key) {
|
||||
*
|
||||
* @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]);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.countby",
|
||||
"version": "4.2.1",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.countBy` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -16,6 +16,6 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseeach": "~4.1.0",
|
||||
"lodash._baseiteratee": "~4.5.0"
|
||||
"lodash._baseiteratee": "~4.6.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.defaultsdeep v4.2.0
|
||||
# lodash.defaultsdeep v4.3.2
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.defaultsDeep` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var defaultsDeep = require('lodash.defaultsdeep');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#defaultsDeep) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.defaultsdeep) for more details.
|
||||
See the [documentation](https://lodash.com/docs#defaultsDeep) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.defaultsdeep) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 4.2.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.2 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
@@ -7,14 +7,11 @@
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var Stack = require('lodash._stack'),
|
||||
baseFor = require('lodash._basefor'),
|
||||
isBuffer = require('lodash.isbuffer'),
|
||||
baseClone = require('lodash._baseclone'),
|
||||
isPlainObject = require('lodash.isplainobject'),
|
||||
keys = require('lodash.keys'),
|
||||
keysIn = require('lodash.keysin'),
|
||||
mergeWith = require('lodash.mergewith'),
|
||||
rest = require('lodash.rest'),
|
||||
root = require('lodash._root');
|
||||
rest = require('lodash.rest');
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||
@@ -33,7 +30,6 @@ var argsTag = '[object Arguments]',
|
||||
regexpTag = '[object RegExp]',
|
||||
setTag = '[object Set]',
|
||||
stringTag = '[object String]',
|
||||
symbolTag = '[object Symbol]',
|
||||
weakMapTag = '[object WeakMap]';
|
||||
|
||||
var arrayBufferTag = '[object ArrayBuffer]',
|
||||
@@ -47,15 +43,6 @@ var arrayBufferTag = '[object ArrayBuffer]',
|
||||
uint16Tag = '[object Uint16Array]',
|
||||
uint32Tag = '[object Uint32Array]';
|
||||
|
||||
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
|
||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||
|
||||
/** Used to match `RegExp` flags from their coerced string values. */
|
||||
var reFlags = /\w*$/;
|
||||
|
||||
/** Used to detect host constructors (Safari > 5). */
|
||||
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||||
|
||||
/** Used to identify `toStringTag` values of typed arrays. */
|
||||
var typedArrayTags = {};
|
||||
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
||||
@@ -71,48 +58,6 @@ typedArrayTags[numberTag] = typedArrayTags[objectTag] =
|
||||
typedArrayTags[regexpTag] = typedArrayTags[setTag] =
|
||||
typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
|
||||
|
||||
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
||||
var cloneableTags = {};
|
||||
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
||||
cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
|
||||
cloneableTags[dateTag] = cloneableTags[float32Tag] =
|
||||
cloneableTags[float64Tag] = cloneableTags[int8Tag] =
|
||||
cloneableTags[int16Tag] = cloneableTags[int32Tag] =
|
||||
cloneableTags[mapTag] = cloneableTags[numberTag] =
|
||||
cloneableTags[objectTag] = cloneableTags[regexpTag] =
|
||||
cloneableTags[setTag] = cloneableTags[stringTag] =
|
||||
cloneableTags[symbolTag] = cloneableTags[uint8Tag] =
|
||||
cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] =
|
||||
cloneableTags[uint32Tag] = true;
|
||||
cloneableTags[errorTag] = cloneableTags[funcTag] =
|
||||
cloneableTags[weakMapTag] = false;
|
||||
|
||||
/**
|
||||
* Adds the key-value `pair` to `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to modify.
|
||||
* @param {Array} pair The key-value pair to add.
|
||||
* @returns {Object} Returns `map`.
|
||||
*/
|
||||
function addMapEntry(map, pair) {
|
||||
map.set(pair[0], pair[1]);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds `value` to `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to modify.
|
||||
* @param {*} value The value to add.
|
||||
* @returns {Object} Returns `set`.
|
||||
*/
|
||||
function addSetEntry(set, value) {
|
||||
set.add(value);
|
||||
return set;
|
||||
}
|
||||
|
||||
/**
|
||||
* A faster alternative to `Function#apply`, this function invokes `func`
|
||||
* with the `this` binding of `thisArg` and the arguments of `args`.
|
||||
@@ -155,89 +100,9 @@ function arrayEach(array, iteratee) {
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* A specialized version of `_.reduce` for arrays without support for
|
||||
* iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {*} [accumulator] The initial value.
|
||||
* @param {boolean} [initAccum] Specify using the first element of `array` as the initial value.
|
||||
* @returns {*} Returns the accumulated value.
|
||||
*/
|
||||
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
if (initAccum && length) {
|
||||
accumulator = array[++index];
|
||||
}
|
||||
while (++index < length) {
|
||||
accumulator = iteratee(accumulator, array[index], index, array);
|
||||
}
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a host object in IE < 9.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
||||
*/
|
||||
function isHostObject(value) {
|
||||
// Many host objects are `Object` objects that can coerce to strings
|
||||
// despite having improperly defined `toString` methods.
|
||||
var result = false;
|
||||
if (value != null && typeof value.toString != 'function') {
|
||||
try {
|
||||
result = !!(value + '');
|
||||
} catch (e) {}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `map` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function mapToArray(map) {
|
||||
var index = -1,
|
||||
result = Array(map.size);
|
||||
|
||||
map.forEach(function(value, key) {
|
||||
result[++index] = [key, value];
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `set` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function setToArray(set) {
|
||||
var index = -1,
|
||||
result = Array(set.size);
|
||||
|
||||
set.forEach(function(value) {
|
||||
result[++index] = value;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to resolve the decompiled source of functions. */
|
||||
var funcToString = Function.prototype.toString;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
@@ -247,35 +112,12 @@ var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
|
||||
/** Used to detect if a method is native. */
|
||||
var reIsNative = RegExp('^' +
|
||||
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
||||
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
||||
);
|
||||
|
||||
/** Built-in value references. */
|
||||
var Symbol = root.Symbol,
|
||||
Uint8Array = root.Uint8Array,
|
||||
getOwnPropertySymbols = Object.getOwnPropertySymbols,
|
||||
objectCreate = Object.create,
|
||||
propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var Map = getNative(root, 'Map'),
|
||||
Set = getNative(root, 'Set'),
|
||||
WeakMap = getNative(root, 'WeakMap');
|
||||
|
||||
/** Used to detect maps, sets, and weakmaps. */
|
||||
var mapCtorString = Map ? funcToString.call(Map) : '',
|
||||
setCtorString = Set ? funcToString.call(Set) : '',
|
||||
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';
|
||||
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
||||
symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
|
||||
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||||
|
||||
/**
|
||||
* This function is like `assignValue` except that it doesn't assign `undefined` values.
|
||||
* This function is like `assignValue` except that it doesn't assign
|
||||
* `undefined` values.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to modify.
|
||||
@@ -301,116 +143,12 @@ function assignMergeValue(object, key, value) {
|
||||
*/
|
||||
function assignValue(object, key, value) {
|
||||
var objValue = object[key];
|
||||
if ((!eq(objValue, value) ||
|
||||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) ||
|
||||
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
||||
(value === undefined && !(key in object))) {
|
||||
object[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.assign` without support for multiple sources
|
||||
* or `customizer` functions.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The destination object.
|
||||
* @param {Object} source The source object.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseAssign(object, source) {
|
||||
return object && copyObject(source, keys(source), object);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
||||
* traversed objects.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @param {Function} [customizer] The function to customize cloning.
|
||||
* @param {string} [key] The key of `value`.
|
||||
* @param {Object} [object] The parent object of `value`.
|
||||
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
||||
* @returns {*} Returns the cloned value.
|
||||
*/
|
||||
function baseClone(value, isDeep, customizer, key, object, stack) {
|
||||
var result;
|
||||
if (customizer) {
|
||||
result = object ? customizer(value, key, object, stack) : customizer(value);
|
||||
}
|
||||
if (result !== undefined) {
|
||||
return result;
|
||||
}
|
||||
if (!isObject(value)) {
|
||||
return value;
|
||||
}
|
||||
var isArr = isArray(value);
|
||||
if (isArr) {
|
||||
result = initCloneArray(value);
|
||||
if (!isDeep) {
|
||||
return copyArray(value, result);
|
||||
}
|
||||
} else {
|
||||
var tag = getTag(value),
|
||||
isFunc = tag == funcTag || tag == genTag;
|
||||
|
||||
if (isBuffer(value)) {
|
||||
return cloneBuffer(value, isDeep);
|
||||
}
|
||||
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
||||
if (isHostObject(value)) {
|
||||
return object ? value : {};
|
||||
}
|
||||
result = initCloneObject(isFunc ? {} : value);
|
||||
if (!isDeep) {
|
||||
return copySymbols(value, baseAssign(result, value));
|
||||
}
|
||||
} else {
|
||||
return cloneableTags[tag]
|
||||
? initCloneByTag(value, tag, isDeep)
|
||||
: (object ? value : {});
|
||||
}
|
||||
}
|
||||
// Check for circular references and return its corresponding clone.
|
||||
stack || (stack = new Stack);
|
||||
var stacked = stack.get(value);
|
||||
if (stacked) {
|
||||
return stacked;
|
||||
}
|
||||
stack.set(value, result);
|
||||
|
||||
// Recursively populate clone (susceptible to call stack limits).
|
||||
(isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
|
||||
assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack));
|
||||
});
|
||||
return isArr ? result : copySymbols(value, result);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.create` without support for assigning
|
||||
* properties to the created object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} prototype The object to inherit from.
|
||||
* @returns {Object} Returns the new object.
|
||||
*/
|
||||
function baseCreate(proto) {
|
||||
return isObject(proto) ? objectCreate(proto) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function baseForOwn(object, iteratee) {
|
||||
return object && baseFor(object, iteratee, keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `_.merge` without support for multiple sources.
|
||||
*
|
||||
@@ -491,7 +229,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
|
||||
}
|
||||
else {
|
||||
isCommon = false;
|
||||
newValue = baseClone(srcValue, true);
|
||||
newValue = baseClone(srcValue, !customizer);
|
||||
}
|
||||
}
|
||||
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
||||
@@ -500,7 +238,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
|
||||
}
|
||||
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
|
||||
isCommon = false;
|
||||
newValue = baseClone(srcValue, true);
|
||||
newValue = baseClone(srcValue, !customizer);
|
||||
}
|
||||
else {
|
||||
newValue = objValue;
|
||||
@@ -516,6 +254,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
|
||||
// Recursively merge objects and arrays (susceptible to call stack limits).
|
||||
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
||||
}
|
||||
stack['delete'](srcValue);
|
||||
assignMergeValue(object, key, newValue);
|
||||
}
|
||||
|
||||
@@ -532,107 +271,6 @@ function baseProperty(key) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `buffer`.
|
||||
*
|
||||
* @private
|
||||
* @param {Buffer} buffer The buffer to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Buffer} Returns the cloned buffer.
|
||||
*/
|
||||
function cloneBuffer(buffer, isDeep) {
|
||||
if (isDeep) {
|
||||
return buffer.slice();
|
||||
}
|
||||
var Ctor = buffer.constructor,
|
||||
result = new Ctor(buffer.length);
|
||||
|
||||
buffer.copy(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `arrayBuffer`.
|
||||
*
|
||||
* @private
|
||||
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
||||
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
||||
*/
|
||||
function cloneArrayBuffer(arrayBuffer) {
|
||||
var Ctor = arrayBuffer.constructor,
|
||||
result = new Ctor(arrayBuffer.byteLength),
|
||||
view = new Uint8Array(result);
|
||||
|
||||
view.set(new Uint8Array(arrayBuffer));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to clone.
|
||||
* @returns {Object} Returns the cloned map.
|
||||
*/
|
||||
function cloneMap(map) {
|
||||
var Ctor = map.constructor;
|
||||
return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `regexp`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} regexp The regexp to clone.
|
||||
* @returns {Object} Returns the cloned regexp.
|
||||
*/
|
||||
function cloneRegExp(regexp) {
|
||||
var Ctor = regexp.constructor,
|
||||
result = new Ctor(regexp.source, reFlags.exec(regexp));
|
||||
|
||||
result.lastIndex = regexp.lastIndex;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `set`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to clone.
|
||||
* @returns {Object} Returns the cloned set.
|
||||
*/
|
||||
function cloneSet(set) {
|
||||
var Ctor = set.constructor;
|
||||
return arrayReduce(setToArray(set), addSetEntry, new Ctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of the `symbol` object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} symbol The symbol object to clone.
|
||||
* @returns {Object} Returns the cloned symbol object.
|
||||
*/
|
||||
function cloneSymbol(symbol) {
|
||||
return Symbol ? Object(symbolValueOf.call(symbol)) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `typedArray`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} typedArray The typed array to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the cloned typed array.
|
||||
*/
|
||||
function cloneTypedArray(typedArray, isDeep) {
|
||||
var arrayBuffer = typedArray.buffer,
|
||||
buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer,
|
||||
Ctor = typedArray.constructor;
|
||||
|
||||
return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the values of `source` to `array`.
|
||||
*
|
||||
@@ -694,18 +332,6 @@ function copyObjectWith(source, props, object, customizer) {
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies own symbol properties of `source` to `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object to copy symbols from.
|
||||
* @param {Object} [object={}] The object to copy symbols to.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
function copySymbols(source, object) {
|
||||
return copyObject(source, getSymbols(source), object);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the "length" property value of `object`.
|
||||
*
|
||||
@@ -718,154 +344,6 @@ function copySymbols(source, object) {
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Gets the native function at `key` of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @param {string} key The key of the method to get.
|
||||
* @returns {*} Returns the function if it's native, else `undefined`.
|
||||
*/
|
||||
function getNative(object, key) {
|
||||
var value = object == null ? undefined : object[key];
|
||||
return isNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of the own symbol properties of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of symbols.
|
||||
*/
|
||||
var getSymbols = getOwnPropertySymbols || function() {
|
||||
return [];
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {string} Returns the `toStringTag`.
|
||||
*/
|
||||
function getTag(value) {
|
||||
return objectToString.call(value);
|
||||
}
|
||||
|
||||
// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps.
|
||||
if ((Map && getTag(new Map) != mapTag) ||
|
||||
(Set && getTag(new Set) != setTag) ||
|
||||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
||||
getTag = function(value) {
|
||||
var result = objectToString.call(value),
|
||||
Ctor = result == objectTag ? value.constructor : null,
|
||||
ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
|
||||
|
||||
if (ctorString) {
|
||||
switch (ctorString) {
|
||||
case mapCtorString: return mapTag;
|
||||
case setCtorString: return setTag;
|
||||
case weakMapCtorString: return weakMapTag;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an array clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to clone.
|
||||
* @returns {Array} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneArray(array) {
|
||||
var length = array.length,
|
||||
result = array.constructor(length);
|
||||
|
||||
// Add properties assigned by `RegExp#exec`.
|
||||
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
||||
result.index = array.index;
|
||||
result.input = array.input;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an object clone.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneObject(object) {
|
||||
if (isPrototype(object)) {
|
||||
return {};
|
||||
}
|
||||
var Ctor = object.constructor;
|
||||
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes an object clone based on its `toStringTag`.
|
||||
*
|
||||
* **Note:** This function only supports cloning values with tags of
|
||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {string} tag The `toStringTag` of the object to clone.
|
||||
* @param {boolean} [isDeep] Specify a deep clone.
|
||||
* @returns {Object} Returns the initialized clone.
|
||||
*/
|
||||
function initCloneByTag(object, tag, isDeep) {
|
||||
var Ctor = object.constructor;
|
||||
switch (tag) {
|
||||
case arrayBufferTag:
|
||||
return cloneArrayBuffer(object);
|
||||
|
||||
case boolTag:
|
||||
case dateTag:
|
||||
return new Ctor(+object);
|
||||
|
||||
case float32Tag: case float64Tag:
|
||||
case int8Tag: case int16Tag: case int32Tag:
|
||||
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
||||
return cloneTypedArray(object, isDeep);
|
||||
|
||||
case mapTag:
|
||||
return cloneMap(object);
|
||||
|
||||
case numberTag:
|
||||
case stringTag:
|
||||
return new Ctor(object);
|
||||
|
||||
case regexpTag:
|
||||
return cloneRegExp(object);
|
||||
|
||||
case setTag:
|
||||
return cloneSet(object);
|
||||
|
||||
case symbolTag:
|
||||
return cloneSymbol(object);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is likely a prototype object.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
||||
*/
|
||||
function isPrototype(value) {
|
||||
var Ctor = value && value.constructor,
|
||||
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
||||
|
||||
return value === proto;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `_.defaultsDeep` to customize its `_.merge` use.
|
||||
*
|
||||
@@ -880,8 +358,7 @@ function isPrototype(value) {
|
||||
*/
|
||||
function mergeDefaults(objValue, srcValue, key, object, source, stack) {
|
||||
if (isObject(objValue) && isObject(srcValue)) {
|
||||
stack.set(srcValue, objValue);
|
||||
baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);
|
||||
baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue));
|
||||
}
|
||||
return objValue;
|
||||
}
|
||||
@@ -992,8 +469,7 @@ var isArray = Array.isArray;
|
||||
* // => false
|
||||
*/
|
||||
function isArrayLike(value) {
|
||||
return value != null &&
|
||||
!(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
|
||||
return value != null && isLength(getLength(value)) && !isFunction(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1041,8 +517,8 @@ function isArrayLikeObject(value) {
|
||||
*/
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 8 which returns 'object' for typed array constructors, and
|
||||
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
// in Safari 8 which returns 'object' for typed array and weak map constructors,
|
||||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
|
||||
var tag = isObject(value) ? objectToString.call(value) : '';
|
||||
return tag == funcTag || tag == genTag;
|
||||
}
|
||||
@@ -1131,33 +607,6 @@ function isObjectLike(value) {
|
||||
return !!value && typeof value == 'object';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a native function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @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 (value == null) {
|
||||
return false;
|
||||
}
|
||||
if (isFunction(value)) {
|
||||
return reIsNative.test(funcToString.call(value));
|
||||
}
|
||||
return isObjectLike(value) &&
|
||||
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a typed array.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.defaultsdeep",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.2",
|
||||
"description": "The lodash method `_.defaultsDeep` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -9,18 +9,15 @@
|
||||
"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@iceddev.com> (https://github.com/phated)",
|
||||
"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.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basefor": "^3.0.0",
|
||||
"lodash._root": "^3.0.0",
|
||||
"lodash._baseclone": "^4.0.0",
|
||||
"lodash._stack": "^4.0.0",
|
||||
"lodash.isbuffer": "^4.0.0",
|
||||
"lodash.isplainobject": "^4.0.0",
|
||||
"lodash.keys": "^4.0.0",
|
||||
"lodash.keysin": "^4.0.0",
|
||||
"lodash.mergewith": "^4.0.0",
|
||||
"lodash.rest": "^4.0.0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.difference v4.2.0
|
||||
# lodash.difference v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.difference` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var difference = require('lodash.difference');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#difference) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.difference) for more details.
|
||||
See the [documentation](https://lodash.com/docs#difference) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.difference) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 4.2.0 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
@@ -32,7 +32,7 @@ var objectToString = objectProto.toString;
|
||||
*
|
||||
* @private
|
||||
* @param {string} key The key of the property to get.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @returns {Function} Returns the new accessor function.
|
||||
*/
|
||||
function baseProperty(key) {
|
||||
return function(object) {
|
||||
@@ -66,6 +66,7 @@ var getLength = baseProperty('length');
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {...Array} [values] The values to exclude.
|
||||
* @returns {Array} Returns the new array of filtered values.
|
||||
* @see _.without, _.xor
|
||||
* @example
|
||||
*
|
||||
* _.difference([3, 2, 1], [4, 2]);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.difference",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.difference` 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._basedifference": "~4.4.0",
|
||||
"lodash._basedifference": "~4.5.0",
|
||||
"lodash._baseflatten": "~4.2.0",
|
||||
"lodash.rest": "^4.0.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.differenceby v4.2.2
|
||||
# lodash.differenceby v4.3.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.2.2-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.3.0-npm-packages/lodash.differenceby) for more details.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* lodash 4.2.2 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.0 (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 baseDifference = require('lodash._basedifference'),
|
||||
baseFlatten = require('lodash._baseflatten'),
|
||||
@@ -43,8 +43,9 @@ function baseProperty(key) {
|
||||
/**
|
||||
* 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.
|
||||
* **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.
|
||||
@@ -60,10 +61,12 @@ var getLength = baseProperty('length');
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {...Array} [values] The values to exclude.
|
||||
* @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
|
||||
* @param {Array|Function|Object|string} [iteratee=_.identity]
|
||||
* The iteratee invoked per element.
|
||||
* @returns {Array} Returns the new array of filtered values.
|
||||
* @example
|
||||
*
|
||||
@@ -89,6 +92,7 @@ var differenceBy = rest(function(array, values) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to query.
|
||||
* @returns {*} Returns the last element of `array`.
|
||||
@@ -109,6 +113,7 @@ function last(array) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||||
@@ -136,9 +141,11 @@ function isArrayLike(value) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
|
||||
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArrayLikeObject([1, 2, 3]);
|
||||
@@ -162,9 +169,11 @@ function isArrayLikeObject(value) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @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 correctly classified,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isFunction(_);
|
||||
@@ -184,13 +193,16 @@ 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 function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.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);
|
||||
@@ -216,6 +228,7 @@ function isLength(value) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||
@@ -244,6 +257,7 @@ function isObject(value) {
|
||||
*
|
||||
* @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`.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.differenceby",
|
||||
"version": "4.2.2",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.differenceBy` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -17,7 +17,7 @@
|
||||
"dependencies": {
|
||||
"lodash._basedifference": "~4.4.0",
|
||||
"lodash._baseflatten": "~4.1.0",
|
||||
"lodash._baseiteratee": "~4.5.0",
|
||||
"lodash._baseiteratee": "~4.6.0",
|
||||
"lodash.rest": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.differencewith v4.2.0
|
||||
# lodash.differencewith v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.differenceWith` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var differenceWith = require('lodash.differencewith');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#differenceWith) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.differencewith) for more details.
|
||||
See the [documentation](https://lodash.com/docs#differenceWith) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.differencewith) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 4.2.0 (Custom Build) <https://lodash.com/>
|
||||
* 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>
|
||||
@@ -32,7 +32,7 @@ var objectToString = objectProto.toString;
|
||||
*
|
||||
* @private
|
||||
* @param {string} key The key of the property to get.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @returns {Function} Returns the new accessor function.
|
||||
*/
|
||||
function baseProperty(key) {
|
||||
return function(object) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.differencewith",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.differenceWith` 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._basedifference": "~4.4.0",
|
||||
"lodash._basedifference": "~4.5.0",
|
||||
"lodash._baseflatten": "~4.2.0",
|
||||
"lodash.rest": "^4.0.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.droprightwhile v4.2.1
|
||||
# lodash.droprightwhile v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.dropRightWhile` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var dropRightWhile = require('lodash.droprightwhile');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#dropRightWhile) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.droprightwhile) for more details.
|
||||
See the [documentation](https://lodash.com/docs#dropRightWhile) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.droprightwhile) for more details.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* lodash 4.2.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.0 (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 baseIteratee = require('lodash._baseiteratee'),
|
||||
baseSlice = require('lodash._baseslice');
|
||||
@@ -39,9 +39,11 @@ function baseWhile(array, predicate, isDrop, fromRight) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to query.
|
||||
* @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
|
||||
* @param {Array|Function|Object|string} [predicate=_.identity]
|
||||
* The function invoked per iteration.
|
||||
* @returns {Array} Returns the slice of `array`.
|
||||
* @example
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.droprightwhile",
|
||||
"version": "4.2.1",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.dropRightWhile` 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._baseiteratee": "~4.5.0",
|
||||
"lodash._baseiteratee": "~4.6.0",
|
||||
"lodash._baseslice": "~4.0.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.dropwhile v4.2.1
|
||||
# lodash.dropwhile v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.dropWhile` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var dropWhile = require('lodash.dropwhile');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#dropWhile) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.dropwhile) for more details.
|
||||
See the [documentation](https://lodash.com/docs#dropWhile) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.dropwhile) for more details.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* lodash 4.2.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.0 (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 baseIteratee = require('lodash._baseiteratee'),
|
||||
baseSlice = require('lodash._baseslice');
|
||||
@@ -39,9 +39,11 @@ function baseWhile(array, predicate, isDrop, fromRight) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to query.
|
||||
* @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
|
||||
* @param {Array|Function|Object|string} [predicate=_.identity]
|
||||
* The function invoked per iteration.
|
||||
* @returns {Array} Returns the slice of `array`.
|
||||
* @example
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.dropwhile",
|
||||
"version": "4.2.1",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.dropWhile` 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._baseiteratee": "~4.5.0",
|
||||
"lodash._baseiteratee": "~4.6.0",
|
||||
"lodash._baseslice": "~4.0.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.every v4.2.2
|
||||
# lodash.every v4.3.1
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.every` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var every = require('lodash.every');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#every) or [package source](https://github.com/lodash/lodash/blob/4.2.2-npm-packages/lodash.every) for more details.
|
||||
See the [documentation](https://lodash.com/docs#every) or [package source](https://github.com/lodash/lodash/blob/4.3.1-npm-packages/lodash.every) for more details.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* lodash 4.2.2 (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 baseEach = require('lodash._baseeach'),
|
||||
baseIteratee = require('lodash._baseiteratee');
|
||||
@@ -26,7 +26,8 @@ var reIsUint = /^(?:0|[1-9]\d*)$/;
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @returns {boolean} Returns `true` if all elements pass the predicate check, else `false`.
|
||||
* @returns {boolean} Returns `true` if all elements pass the predicate check,
|
||||
* else `false`.
|
||||
*/
|
||||
function arrayEvery(array, predicate) {
|
||||
var index = -1,
|
||||
@@ -40,25 +41,12 @@ function arrayEvery(array, predicate) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like index.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||
*/
|
||||
function isIndex(value, length) {
|
||||
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
|
||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||
return value > -1 && value % 1 == 0 && value < length;
|
||||
}
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objectToString = objectProto.toString;
|
||||
@@ -69,7 +57,8 @@ var objectToString = objectProto.toString;
|
||||
* @private
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @returns {boolean} Returns `true` if all elements pass the predicate check, else `false`
|
||||
* @returns {boolean} Returns `true` if all elements pass the predicate check,
|
||||
* else `false`
|
||||
*/
|
||||
function baseEvery(collection, predicate) {
|
||||
var result = true;
|
||||
@@ -85,7 +74,7 @@ function baseEvery(collection, predicate) {
|
||||
*
|
||||
* @private
|
||||
* @param {string} key The key of the property to get.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @returns {Function} Returns the new accessor function.
|
||||
*/
|
||||
function baseProperty(key) {
|
||||
return function(object) {
|
||||
@@ -96,8 +85,9 @@ function baseProperty(key) {
|
||||
/**
|
||||
* 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.
|
||||
* **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.
|
||||
@@ -105,6 +95,21 @@ function baseProperty(key) {
|
||||
*/
|
||||
var getLength = baseProperty('length');
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like index.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||
*/
|
||||
function isIndex(value, length) {
|
||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||
return !!length &&
|
||||
(typeof value == 'number' || reIsUint.test(value)) &&
|
||||
(value > -1 && value % 1 == 0 && value < length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given arguments are from an iteratee call.
|
||||
*
|
||||
@@ -112,7 +117,8 @@ var getLength = baseProperty('length');
|
||||
* @param {*} value The potential iteratee value argument.
|
||||
* @param {*} index The potential iteratee index or key argument.
|
||||
* @param {*} object The potential iteratee object argument.
|
||||
* @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
|
||||
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
||||
* else `false`.
|
||||
*/
|
||||
function isIterateeCall(value, index, object) {
|
||||
if (!isObject(object)) {
|
||||
@@ -120,8 +126,9 @@ function isIterateeCall(value, index, object) {
|
||||
}
|
||||
var type = typeof index;
|
||||
if (type == 'number'
|
||||
? (isArrayLike(object) && isIndex(index, object.length))
|
||||
: (type == 'string' && index in object)) {
|
||||
? (isArrayLike(object) && isIndex(index, object.length))
|
||||
: (type == 'string' && index in object)
|
||||
) {
|
||||
return eq(object[index], value);
|
||||
}
|
||||
return false;
|
||||
@@ -134,19 +141,22 @@ function isIterateeCall(value, index, object) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Collection
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
|
||||
* @returns {boolean} Returns `true` if all elements pass the predicate check, else `false`.
|
||||
* @param {Array|Function|Object|string} [predicate=_.identity]
|
||||
* The function invoked per iteration.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
||||
* @returns {boolean} Returns `true` if all elements pass the predicate check,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.every([true, 1, null, 'yes'], Boolean);
|
||||
* // => false
|
||||
*
|
||||
* var users = [
|
||||
* { 'user': 'barney', 'active': false },
|
||||
* { 'user': 'fred', 'active': false }
|
||||
* { 'user': 'barney', 'age': 36, 'active': false },
|
||||
* { 'user': 'fred', 'age': 40, 'active': false }
|
||||
* ];
|
||||
*
|
||||
* // The `_.matches` iteratee shorthand.
|
||||
@@ -170,11 +180,13 @@ function every(collection, predicate, guard) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* Performs a
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* comparison between two values to determine if they are equivalent.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to compare.
|
||||
* @param {*} other The other value to compare.
|
||||
@@ -208,10 +220,12 @@ function eq(value, other) {
|
||||
*
|
||||
* @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]);
|
||||
@@ -235,6 +249,7 @@ var isArray = Array.isArray;
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||||
@@ -261,9 +276,11 @@ function isArrayLike(value) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @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 correctly classified,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isFunction(_);
|
||||
@@ -283,13 +300,16 @@ 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 function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.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);
|
||||
@@ -310,11 +330,13 @@ function isLength(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
|
||||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
* Checks if `value` is the
|
||||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
|
||||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.every",
|
||||
"version": "4.2.2",
|
||||
"version": "4.3.1",
|
||||
"description": "The lodash method `_.every` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -16,6 +16,6 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._baseeach": "~4.1.0",
|
||||
"lodash._baseiteratee": "~4.5.0"
|
||||
"lodash._baseiteratee": "~4.6.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.filter v4.2.2
|
||||
# lodash.filter v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.filter` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var filter = require('lodash.filter');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#filter) or [package source](https://github.com/lodash/lodash/blob/4.2.2-npm-packages/lodash.filter) for more details.
|
||||
See the [documentation](https://lodash.com/docs#filter) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.filter) for more details.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* lodash 4.2.2 (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 baseFilter = require('lodash._basefilter'),
|
||||
baseIteratee = require('lodash._baseiteratee');
|
||||
@@ -35,15 +35,18 @@ function arrayFilter(array, predicate) {
|
||||
|
||||
/**
|
||||
* Iterates over elements of `collection`, returning an array of all elements
|
||||
* `predicate` returns truthy for. The predicate is invoked with three arguments:
|
||||
* (value, index|key, collection).
|
||||
* `predicate` returns truthy for. The predicate is invoked with three
|
||||
* arguments: (value, index|key, collection).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Collection
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
|
||||
* @param {Array|Function|Object|string} [predicate=_.identity]
|
||||
* The function invoked per iteration.
|
||||
* @returns {Array} Returns the new filtered array.
|
||||
* @see _.reject
|
||||
* @example
|
||||
*
|
||||
* var users = [
|
||||
@@ -76,10 +79,12 @@ function filter(collection, predicate) {
|
||||
*
|
||||
* @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]);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.filter",
|
||||
"version": "4.2.2",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.filter` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -16,6 +16,6 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basefilter": "~4.0.0",
|
||||
"lodash._baseiteratee": "~4.5.0"
|
||||
"lodash._baseiteratee": "~4.6.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.find v4.2.1
|
||||
# lodash.find v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.find` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var find = require('lodash.find');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#find) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.find) for more details.
|
||||
See the [documentation](https://lodash.com/docs#find) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.find) for more details.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* lodash 4.2.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.0 (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 baseEach = require('lodash._baseeach'),
|
||||
baseFind = require('lodash._basefind'),
|
||||
@@ -13,14 +13,16 @@ var baseEach = require('lodash._baseeach'),
|
||||
|
||||
/**
|
||||
* Iterates over elements of `collection`, returning the first element
|
||||
* `predicate` returns truthy for. The predicate is invoked with three arguments:
|
||||
* (value, index|key, collection).
|
||||
* `predicate` returns truthy for. The predicate is invoked with three
|
||||
* arguments: (value, index|key, collection).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Collection
|
||||
* @param {Array|Object} collection The collection to search.
|
||||
* @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
|
||||
* @param {Array|Function|Object|string} [predicate=_.identity]
|
||||
* The function invoked per iteration.
|
||||
* @returns {*} Returns the matched element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
@@ -59,10 +61,12 @@ function find(collection, predicate) {
|
||||
*
|
||||
* @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]);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.find",
|
||||
"version": "4.2.1",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.find` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -18,6 +18,6 @@
|
||||
"lodash._baseeach": "~4.1.0",
|
||||
"lodash._basefind": "~3.0.0",
|
||||
"lodash._basefindindex": "~3.6.0",
|
||||
"lodash._baseiteratee": "~4.5.0"
|
||||
"lodash._baseiteratee": "~4.6.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.findindex v4.2.1
|
||||
# lodash.findindex v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.findIndex` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var findIndex = require('lodash.findindex');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#findIndex) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.findindex) for more details.
|
||||
See the [documentation](https://lodash.com/docs#findIndex) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.findindex) for more details.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* lodash 4.2.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.0 (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 baseFindIndex = require('lodash._basefindindex'),
|
||||
baseIteratee = require('lodash._baseiteratee');
|
||||
@@ -15,9 +15,11 @@ var baseFindIndex = require('lodash._basefindindex'),
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 1.1.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
|
||||
* @param {Array|Function|Object|string} [predicate=_.identity]
|
||||
* The function invoked per iteration.
|
||||
* @returns {number} Returns the index of the found element, else `-1`.
|
||||
* @example
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.findindex",
|
||||
"version": "4.2.1",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.findIndex` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -16,6 +16,6 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basefindindex": "~3.6.0",
|
||||
"lodash._baseiteratee": "~4.5.0"
|
||||
"lodash._baseiteratee": "~4.6.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.findkey v4.2.1
|
||||
# lodash.findkey v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.findKey` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var findKey = require('lodash.findkey');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#findKey) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.findkey) for more details.
|
||||
See the [documentation](https://lodash.com/docs#findKey) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.findkey) for more details.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* lodash 4.2.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.0 (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 baseFind = require('lodash._basefind'),
|
||||
baseFor = require('lodash._basefor'),
|
||||
@@ -29,10 +29,13 @@ function baseForOwn(object, iteratee) {
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 1.1.0
|
||||
* @category Object
|
||||
* @param {Object} object The object to search.
|
||||
* @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
|
||||
* @returns {string|undefined} Returns the key of the matched element, else `undefined`.
|
||||
* @param {Array|Function|Object|string} [predicate=_.identity]
|
||||
* The function invoked per iteration.
|
||||
* @returns {string|undefined} Returns the key of the matched element,
|
||||
* else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* var users = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.findkey",
|
||||
"version": "4.2.1",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.findKey` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -17,7 +17,7 @@
|
||||
"dependencies": {
|
||||
"lodash._basefind": "~3.0.0",
|
||||
"lodash._basefor": "~3.0.0",
|
||||
"lodash._baseiteratee": "~4.5.0",
|
||||
"lodash._baseiteratee": "~4.6.0",
|
||||
"lodash.keys": "^4.0.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.findlast v4.2.1
|
||||
# lodash.findlast v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.findLast` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var findLast = require('lodash.findlast');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#findLast) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.findlast) for more details.
|
||||
See the [documentation](https://lodash.com/docs#findLast) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.findlast) for more details.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* lodash 4.2.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.0 (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 baseEachRight = require('lodash._baseeachright'),
|
||||
baseFind = require('lodash._basefind'),
|
||||
@@ -17,9 +17,11 @@ var baseEachRight = require('lodash._baseeachright'),
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 2.0.0
|
||||
* @category Collection
|
||||
* @param {Array|Object} collection The collection to search.
|
||||
* @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
|
||||
* @param {Array|Function|Object|string} [predicate=_.identity]
|
||||
* The function invoked per iteration.
|
||||
* @returns {*} Returns the matched element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
@@ -42,10 +44,12 @@ function findLast(collection, predicate) {
|
||||
*
|
||||
* @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]);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.findlast",
|
||||
"version": "4.2.1",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.findLast` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -18,6 +18,6 @@
|
||||
"lodash._baseeachright": "~4.1.0",
|
||||
"lodash._basefind": "~3.0.0",
|
||||
"lodash._basefindindex": "~3.6.0",
|
||||
"lodash._baseiteratee": "~4.5.0"
|
||||
"lodash._baseiteratee": "~4.6.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.findlastindex v4.2.1
|
||||
# lodash.findlastindex v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.findLastIndex` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var findLastIndex = require('lodash.findlastindex');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#findLastIndex) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.findlastindex) for more details.
|
||||
See the [documentation](https://lodash.com/docs#findLastIndex) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.findlastindex) for more details.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* lodash 4.2.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.0 (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 baseFindIndex = require('lodash._basefindindex'),
|
||||
baseIteratee = require('lodash._baseiteratee');
|
||||
@@ -15,9 +15,11 @@ var baseFindIndex = require('lodash._basefindindex'),
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 2.0.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
|
||||
* @param {Array|Function|Object|string} [predicate=_.identity]
|
||||
* The function invoked per iteration.
|
||||
* @returns {number} Returns the index of the found element, else `-1`.
|
||||
* @example
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.findlastindex",
|
||||
"version": "4.2.1",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.findLastIndex` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -16,6 +16,6 @@
|
||||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basefindindex": "~3.6.0",
|
||||
"lodash._baseiteratee": "~4.5.0"
|
||||
"lodash._baseiteratee": "~4.6.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.findlastkey v4.2.0
|
||||
# lodash.findlastkey v4.3.1
|
||||
|
||||
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.2.0-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.3.1-npm-packages/lodash.findlastkey) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 4.2.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.1 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
@@ -7,21 +7,10 @@
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var baseFind = require('lodash._basefind'),
|
||||
baseForRight = require('lodash._baseforright'),
|
||||
baseIteratee = require('lodash._baseiteratee'),
|
||||
keys = require('lodash.keys');
|
||||
|
||||
/**
|
||||
* This function is like `baseFor` except that it iterates over properties
|
||||
* in the opposite order.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @param {Function} keysFunc The function to get the keys of `object`.
|
||||
* @returns {Object} Returns `object`.
|
||||
*/
|
||||
var baseForRight = createBaseFor(true);
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwnRight` without support for iteratee shorthands.
|
||||
*
|
||||
@@ -34,30 +23,6 @@ function baseForOwnRight(object, iteratee) {
|
||||
return object && baseForRight(object, iteratee, keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a base function for methods like `_.forIn`.
|
||||
*
|
||||
* @private
|
||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||
* @returns {Function} Returns the new base function.
|
||||
*/
|
||||
function createBaseFor(fromRight) {
|
||||
return function(object, iteratee, keysFunc) {
|
||||
var index = -1,
|
||||
iterable = Object(object),
|
||||
props = keysFunc(object),
|
||||
length = props.length;
|
||||
|
||||
while (length--) {
|
||||
var key = props[fromRight ? length : ++index];
|
||||
if (iteratee(iterable[key], key, iterable) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return object;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.findKey` except that it iterates over elements of
|
||||
* a collection in the opposite order.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.findlastkey",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.1",
|
||||
"description": "The lodash method `_.findLastKey` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -9,14 +9,15 @@
|
||||
"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@iceddev.com> (https://github.com/phated)",
|
||||
"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.\"" },
|
||||
"dependencies": {
|
||||
"lodash._basefind": "^3.0.0",
|
||||
"lodash._baseiteratee": "^4.0.0",
|
||||
"lodash._basefind": "~3.0.0",
|
||||
"lodash._baseforright": "~4.0.0",
|
||||
"lodash._baseiteratee": "~4.5.0",
|
||||
"lodash.keys": "^4.0.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.flatmap v4.2.1
|
||||
# lodash.flatmap v4.3.0
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.flatMap` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var flatMap = require('lodash.flatmap');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#flatMap) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.flatmap) for more details.
|
||||
See the [documentation](https://lodash.com/docs#flatMap) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.flatmap) for more details.
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/**
|
||||
* lodash 4.2.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.3.0 (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 baseFlatten = require('lodash._baseflatten'),
|
||||
map = require('lodash.map');
|
||||
|
||||
/**
|
||||
* Creates a flattened array of values by running each element in `collection`
|
||||
* through `iteratee` and flattening the mapped results. The iteratee is
|
||||
* invoked with three arguments: (value, index|key, collection).
|
||||
* thru `iteratee` and flattening the mapped results. The iteratee is invoked
|
||||
* with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.flatmap",
|
||||
"version": "4.2.1",
|
||||
"version": "4.3.0",
|
||||
"description": "The lodash method `_.flatMap` 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._baseflatten": "~4.1.0",
|
||||
"lodash._baseflatten": "~4.2.0",
|
||||
"lodash.map": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user