正在显示
100 个修改的文件
包含
0 行增加
和
2627 行删除
node_modules/lodash/LICENSE
已删除
100644 → 0
1 | -Copyright OpenJS Foundation and other contributors <https://openjsf.org/> | ||
2 | - | ||
3 | -Based on Underscore.js, copyright Jeremy Ashkenas, | ||
4 | -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> | ||
5 | - | ||
6 | -This software consists of voluntary contributions made by many | ||
7 | -individuals. For exact contribution history, see the revision history | ||
8 | -available at https://github.com/lodash/lodash | ||
9 | - | ||
10 | -The following license applies to all parts of this software except as | ||
11 | -documented below: | ||
12 | - | ||
13 | -==== | ||
14 | - | ||
15 | -Permission is hereby granted, free of charge, to any person obtaining | ||
16 | -a copy of this software and associated documentation files (the | ||
17 | -"Software"), to deal in the Software without restriction, including | ||
18 | -without limitation the rights to use, copy, modify, merge, publish, | ||
19 | -distribute, sublicense, and/or sell copies of the Software, and to | ||
20 | -permit persons to whom the Software is furnished to do so, subject to | ||
21 | -the following conditions: | ||
22 | - | ||
23 | -The above copyright notice and this permission notice shall be | ||
24 | -included in all copies or substantial portions of the Software. | ||
25 | - | ||
26 | -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
27 | -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
28 | -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
29 | -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
30 | -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
31 | -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
32 | -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
33 | - | ||
34 | -==== | ||
35 | - | ||
36 | -Copyright and related rights for sample code are waived via CC0. Sample | ||
37 | -code is defined as all source code displayed within the prose of the | ||
38 | -documentation. | ||
39 | - | ||
40 | -CC0: http://creativecommons.org/publicdomain/zero/1.0/ | ||
41 | - | ||
42 | -==== | ||
43 | - | ||
44 | -Files located in the node_modules and vendor directories are externally | ||
45 | -maintained libraries used by this software which have their own | ||
46 | -licenses; we recommend you read them, as their terms may differ from the | ||
47 | -terms above. |
node_modules/lodash/README.md
已删除
100644 → 0
1 | -# lodash v4.17.21 | ||
2 | - | ||
3 | -The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. | ||
4 | - | ||
5 | -## Installation | ||
6 | - | ||
7 | -Using npm: | ||
8 | -```shell | ||
9 | -$ npm i -g npm | ||
10 | -$ npm i --save lodash | ||
11 | -``` | ||
12 | - | ||
13 | -In Node.js: | ||
14 | -```js | ||
15 | -// Load the full build. | ||
16 | -var _ = require('lodash'); | ||
17 | -// Load the core build. | ||
18 | -var _ = require('lodash/core'); | ||
19 | -// Load the FP build for immutable auto-curried iteratee-first data-last methods. | ||
20 | -var fp = require('lodash/fp'); | ||
21 | - | ||
22 | -// Load method categories. | ||
23 | -var array = require('lodash/array'); | ||
24 | -var object = require('lodash/fp/object'); | ||
25 | - | ||
26 | -// Cherry-pick methods for smaller browserify/rollup/webpack bundles. | ||
27 | -var at = require('lodash/at'); | ||
28 | -var curryN = require('lodash/fp/curryN'); | ||
29 | -``` | ||
30 | - | ||
31 | -See the [package source](https://github.com/lodash/lodash/tree/4.17.21-npm) for more details. | ||
32 | - | ||
33 | -**Note:**<br> | ||
34 | -Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. | ||
35 | - | ||
36 | -## Support | ||
37 | - | ||
38 | -Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.<br> | ||
39 | -Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. |
node_modules/lodash/_DataView.js
已删除
100644 → 0
node_modules/lodash/_Hash.js
已删除
100644 → 0
1 | -var hashClear = require('./_hashClear'), | ||
2 | - hashDelete = require('./_hashDelete'), | ||
3 | - hashGet = require('./_hashGet'), | ||
4 | - hashHas = require('./_hashHas'), | ||
5 | - hashSet = require('./_hashSet'); | ||
6 | - | ||
7 | -/** | ||
8 | - * Creates a hash object. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @constructor | ||
12 | - * @param {Array} [entries] The key-value pairs to cache. | ||
13 | - */ | ||
14 | -function Hash(entries) { | ||
15 | - var index = -1, | ||
16 | - length = entries == null ? 0 : entries.length; | ||
17 | - | ||
18 | - this.clear(); | ||
19 | - while (++index < length) { | ||
20 | - var entry = entries[index]; | ||
21 | - this.set(entry[0], entry[1]); | ||
22 | - } | ||
23 | -} | ||
24 | - | ||
25 | -// Add methods to `Hash`. | ||
26 | -Hash.prototype.clear = hashClear; | ||
27 | -Hash.prototype['delete'] = hashDelete; | ||
28 | -Hash.prototype.get = hashGet; | ||
29 | -Hash.prototype.has = hashHas; | ||
30 | -Hash.prototype.set = hashSet; | ||
31 | - | ||
32 | -module.exports = Hash; |
node_modules/lodash/_LazyWrapper.js
已删除
100644 → 0
1 | -var baseCreate = require('./_baseCreate'), | ||
2 | - baseLodash = require('./_baseLodash'); | ||
3 | - | ||
4 | -/** Used as references for the maximum length and index of an array. */ | ||
5 | -var MAX_ARRAY_LENGTH = 4294967295; | ||
6 | - | ||
7 | -/** | ||
8 | - * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @constructor | ||
12 | - * @param {*} value The value to wrap. | ||
13 | - */ | ||
14 | -function LazyWrapper(value) { | ||
15 | - this.__wrapped__ = value; | ||
16 | - this.__actions__ = []; | ||
17 | - this.__dir__ = 1; | ||
18 | - this.__filtered__ = false; | ||
19 | - this.__iteratees__ = []; | ||
20 | - this.__takeCount__ = MAX_ARRAY_LENGTH; | ||
21 | - this.__views__ = []; | ||
22 | -} | ||
23 | - | ||
24 | -// Ensure `LazyWrapper` is an instance of `baseLodash`. | ||
25 | -LazyWrapper.prototype = baseCreate(baseLodash.prototype); | ||
26 | -LazyWrapper.prototype.constructor = LazyWrapper; | ||
27 | - | ||
28 | -module.exports = LazyWrapper; |
node_modules/lodash/_ListCache.js
已删除
100644 → 0
1 | -var listCacheClear = require('./_listCacheClear'), | ||
2 | - listCacheDelete = require('./_listCacheDelete'), | ||
3 | - listCacheGet = require('./_listCacheGet'), | ||
4 | - listCacheHas = require('./_listCacheHas'), | ||
5 | - listCacheSet = require('./_listCacheSet'); | ||
6 | - | ||
7 | -/** | ||
8 | - * Creates an list cache object. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @constructor | ||
12 | - * @param {Array} [entries] The key-value pairs to cache. | ||
13 | - */ | ||
14 | -function ListCache(entries) { | ||
15 | - var index = -1, | ||
16 | - length = entries == null ? 0 : entries.length; | ||
17 | - | ||
18 | - this.clear(); | ||
19 | - while (++index < length) { | ||
20 | - var entry = entries[index]; | ||
21 | - this.set(entry[0], entry[1]); | ||
22 | - } | ||
23 | -} | ||
24 | - | ||
25 | -// Add methods to `ListCache`. | ||
26 | -ListCache.prototype.clear = listCacheClear; | ||
27 | -ListCache.prototype['delete'] = listCacheDelete; | ||
28 | -ListCache.prototype.get = listCacheGet; | ||
29 | -ListCache.prototype.has = listCacheHas; | ||
30 | -ListCache.prototype.set = listCacheSet; | ||
31 | - | ||
32 | -module.exports = ListCache; |
node_modules/lodash/_LodashWrapper.js
已删除
100644 → 0
1 | -var baseCreate = require('./_baseCreate'), | ||
2 | - baseLodash = require('./_baseLodash'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base constructor for creating `lodash` wrapper objects. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {*} value The value to wrap. | ||
9 | - * @param {boolean} [chainAll] Enable explicit method chain sequences. | ||
10 | - */ | ||
11 | -function LodashWrapper(value, chainAll) { | ||
12 | - this.__wrapped__ = value; | ||
13 | - this.__actions__ = []; | ||
14 | - this.__chain__ = !!chainAll; | ||
15 | - this.__index__ = 0; | ||
16 | - this.__values__ = undefined; | ||
17 | -} | ||
18 | - | ||
19 | -LodashWrapper.prototype = baseCreate(baseLodash.prototype); | ||
20 | -LodashWrapper.prototype.constructor = LodashWrapper; | ||
21 | - | ||
22 | -module.exports = LodashWrapper; |
node_modules/lodash/_Map.js
已删除
100644 → 0
node_modules/lodash/_MapCache.js
已删除
100644 → 0
1 | -var mapCacheClear = require('./_mapCacheClear'), | ||
2 | - mapCacheDelete = require('./_mapCacheDelete'), | ||
3 | - mapCacheGet = require('./_mapCacheGet'), | ||
4 | - mapCacheHas = require('./_mapCacheHas'), | ||
5 | - mapCacheSet = require('./_mapCacheSet'); | ||
6 | - | ||
7 | -/** | ||
8 | - * Creates a map cache object to store key-value pairs. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @constructor | ||
12 | - * @param {Array} [entries] The key-value pairs to cache. | ||
13 | - */ | ||
14 | -function MapCache(entries) { | ||
15 | - var index = -1, | ||
16 | - length = entries == null ? 0 : entries.length; | ||
17 | - | ||
18 | - this.clear(); | ||
19 | - while (++index < length) { | ||
20 | - var entry = entries[index]; | ||
21 | - this.set(entry[0], entry[1]); | ||
22 | - } | ||
23 | -} | ||
24 | - | ||
25 | -// Add methods to `MapCache`. | ||
26 | -MapCache.prototype.clear = mapCacheClear; | ||
27 | -MapCache.prototype['delete'] = mapCacheDelete; | ||
28 | -MapCache.prototype.get = mapCacheGet; | ||
29 | -MapCache.prototype.has = mapCacheHas; | ||
30 | -MapCache.prototype.set = mapCacheSet; | ||
31 | - | ||
32 | -module.exports = MapCache; |
node_modules/lodash/_Promise.js
已删除
100644 → 0
node_modules/lodash/_Set.js
已删除
100644 → 0
node_modules/lodash/_SetCache.js
已删除
100644 → 0
1 | -var MapCache = require('./_MapCache'), | ||
2 | - setCacheAdd = require('./_setCacheAdd'), | ||
3 | - setCacheHas = require('./_setCacheHas'); | ||
4 | - | ||
5 | -/** | ||
6 | - * | ||
7 | - * Creates an array cache object to store unique values. | ||
8 | - * | ||
9 | - * @private | ||
10 | - * @constructor | ||
11 | - * @param {Array} [values] The values to cache. | ||
12 | - */ | ||
13 | -function SetCache(values) { | ||
14 | - var index = -1, | ||
15 | - length = values == null ? 0 : values.length; | ||
16 | - | ||
17 | - this.__data__ = new MapCache; | ||
18 | - while (++index < length) { | ||
19 | - this.add(values[index]); | ||
20 | - } | ||
21 | -} | ||
22 | - | ||
23 | -// Add methods to `SetCache`. | ||
24 | -SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; | ||
25 | -SetCache.prototype.has = setCacheHas; | ||
26 | - | ||
27 | -module.exports = SetCache; |
node_modules/lodash/_Stack.js
已删除
100644 → 0
1 | -var ListCache = require('./_ListCache'), | ||
2 | - stackClear = require('./_stackClear'), | ||
3 | - stackDelete = require('./_stackDelete'), | ||
4 | - stackGet = require('./_stackGet'), | ||
5 | - stackHas = require('./_stackHas'), | ||
6 | - stackSet = require('./_stackSet'); | ||
7 | - | ||
8 | -/** | ||
9 | - * Creates a stack cache object to store key-value pairs. | ||
10 | - * | ||
11 | - * @private | ||
12 | - * @constructor | ||
13 | - * @param {Array} [entries] The key-value pairs to cache. | ||
14 | - */ | ||
15 | -function Stack(entries) { | ||
16 | - var data = this.__data__ = new ListCache(entries); | ||
17 | - this.size = data.size; | ||
18 | -} | ||
19 | - | ||
20 | -// Add methods to `Stack`. | ||
21 | -Stack.prototype.clear = stackClear; | ||
22 | -Stack.prototype['delete'] = stackDelete; | ||
23 | -Stack.prototype.get = stackGet; | ||
24 | -Stack.prototype.has = stackHas; | ||
25 | -Stack.prototype.set = stackSet; | ||
26 | - | ||
27 | -module.exports = Stack; |
node_modules/lodash/_Symbol.js
已删除
100644 → 0
node_modules/lodash/_Uint8Array.js
已删除
100644 → 0
node_modules/lodash/_WeakMap.js
已删除
100644 → 0
node_modules/lodash/_apply.js
已删除
100644 → 0
1 | -/** | ||
2 | - * A faster alternative to `Function#apply`, this function invokes `func` | ||
3 | - * with the `this` binding of `thisArg` and the arguments of `args`. | ||
4 | - * | ||
5 | - * @private | ||
6 | - * @param {Function} func The function to invoke. | ||
7 | - * @param {*} thisArg The `this` binding of `func`. | ||
8 | - * @param {Array} args The arguments to invoke `func` with. | ||
9 | - * @returns {*} Returns the result of `func`. | ||
10 | - */ | ||
11 | -function apply(func, thisArg, args) { | ||
12 | - switch (args.length) { | ||
13 | - case 0: return func.call(thisArg); | ||
14 | - case 1: return func.call(thisArg, args[0]); | ||
15 | - case 2: return func.call(thisArg, args[0], args[1]); | ||
16 | - case 3: return func.call(thisArg, args[0], args[1], args[2]); | ||
17 | - } | ||
18 | - return func.apply(thisArg, args); | ||
19 | -} | ||
20 | - | ||
21 | -module.exports = apply; |
node_modules/lodash/_arrayAggregator.js
已删除
100644 → 0
1 | -/** | ||
2 | - * A specialized version of `baseAggregator` for arrays. | ||
3 | - * | ||
4 | - * @private | ||
5 | - * @param {Array} [array] The array to iterate over. | ||
6 | - * @param {Function} setter The function to set `accumulator` values. | ||
7 | - * @param {Function} iteratee The iteratee to transform keys. | ||
8 | - * @param {Object} accumulator The initial aggregated object. | ||
9 | - * @returns {Function} Returns `accumulator`. | ||
10 | - */ | ||
11 | -function arrayAggregator(array, setter, iteratee, accumulator) { | ||
12 | - var index = -1, | ||
13 | - length = array == null ? 0 : array.length; | ||
14 | - | ||
15 | - while (++index < length) { | ||
16 | - var value = array[index]; | ||
17 | - setter(accumulator, value, iteratee(value), array); | ||
18 | - } | ||
19 | - return accumulator; | ||
20 | -} | ||
21 | - | ||
22 | -module.exports = arrayAggregator; |
node_modules/lodash/_arrayEach.js
已删除
100644 → 0
1 | -/** | ||
2 | - * A specialized version of `_.forEach` for arrays without support for | ||
3 | - * iteratee shorthands. | ||
4 | - * | ||
5 | - * @private | ||
6 | - * @param {Array} [array] The array to iterate over. | ||
7 | - * @param {Function} iteratee The function invoked per iteration. | ||
8 | - * @returns {Array} Returns `array`. | ||
9 | - */ | ||
10 | -function arrayEach(array, iteratee) { | ||
11 | - var index = -1, | ||
12 | - length = array == null ? 0 : array.length; | ||
13 | - | ||
14 | - while (++index < length) { | ||
15 | - if (iteratee(array[index], index, array) === false) { | ||
16 | - break; | ||
17 | - } | ||
18 | - } | ||
19 | - return array; | ||
20 | -} | ||
21 | - | ||
22 | -module.exports = arrayEach; |
node_modules/lodash/_arrayEachRight.js
已删除
100644 → 0
1 | -/** | ||
2 | - * A specialized version of `_.forEachRight` for arrays without support for | ||
3 | - * iteratee shorthands. | ||
4 | - * | ||
5 | - * @private | ||
6 | - * @param {Array} [array] The array to iterate over. | ||
7 | - * @param {Function} iteratee The function invoked per iteration. | ||
8 | - * @returns {Array} Returns `array`. | ||
9 | - */ | ||
10 | -function arrayEachRight(array, iteratee) { | ||
11 | - var length = array == null ? 0 : array.length; | ||
12 | - | ||
13 | - while (length--) { | ||
14 | - if (iteratee(array[length], length, array) === false) { | ||
15 | - break; | ||
16 | - } | ||
17 | - } | ||
18 | - return array; | ||
19 | -} | ||
20 | - | ||
21 | -module.exports = arrayEachRight; |
node_modules/lodash/_arrayEvery.js
已删除
100644 → 0
1 | -/** | ||
2 | - * A specialized version of `_.every` for arrays without support for | ||
3 | - * iteratee shorthands. | ||
4 | - * | ||
5 | - * @private | ||
6 | - * @param {Array} [array] The array to iterate over. | ||
7 | - * @param {Function} predicate The function invoked per iteration. | ||
8 | - * @returns {boolean} Returns `true` if all elements pass the predicate check, | ||
9 | - * else `false`. | ||
10 | - */ | ||
11 | -function arrayEvery(array, predicate) { | ||
12 | - var index = -1, | ||
13 | - length = array == null ? 0 : array.length; | ||
14 | - | ||
15 | - while (++index < length) { | ||
16 | - if (!predicate(array[index], index, array)) { | ||
17 | - return false; | ||
18 | - } | ||
19 | - } | ||
20 | - return true; | ||
21 | -} | ||
22 | - | ||
23 | -module.exports = arrayEvery; |
node_modules/lodash/_arrayFilter.js
已删除
100644 → 0
1 | -/** | ||
2 | - * A specialized version of `_.filter` for arrays without support for | ||
3 | - * iteratee shorthands. | ||
4 | - * | ||
5 | - * @private | ||
6 | - * @param {Array} [array] The array to iterate over. | ||
7 | - * @param {Function} predicate The function invoked per iteration. | ||
8 | - * @returns {Array} Returns the new filtered array. | ||
9 | - */ | ||
10 | -function arrayFilter(array, predicate) { | ||
11 | - var index = -1, | ||
12 | - length = array == null ? 0 : array.length, | ||
13 | - resIndex = 0, | ||
14 | - result = []; | ||
15 | - | ||
16 | - while (++index < length) { | ||
17 | - var value = array[index]; | ||
18 | - if (predicate(value, index, array)) { | ||
19 | - result[resIndex++] = value; | ||
20 | - } | ||
21 | - } | ||
22 | - return result; | ||
23 | -} | ||
24 | - | ||
25 | -module.exports = arrayFilter; |
node_modules/lodash/_arrayIncludes.js
已删除
100644 → 0
1 | -var baseIndexOf = require('./_baseIndexOf'); | ||
2 | - | ||
3 | -/** | ||
4 | - * A specialized version of `_.includes` for arrays without support for | ||
5 | - * specifying an index to search from. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Array} [array] The array to inspect. | ||
9 | - * @param {*} target The value to search for. | ||
10 | - * @returns {boolean} Returns `true` if `target` is found, else `false`. | ||
11 | - */ | ||
12 | -function arrayIncludes(array, value) { | ||
13 | - var length = array == null ? 0 : array.length; | ||
14 | - return !!length && baseIndexOf(array, value, 0) > -1; | ||
15 | -} | ||
16 | - | ||
17 | -module.exports = arrayIncludes; |
1 | -/** | ||
2 | - * This function is like `arrayIncludes` except that it accepts a comparator. | ||
3 | - * | ||
4 | - * @private | ||
5 | - * @param {Array} [array] The array to inspect. | ||
6 | - * @param {*} target The value to search for. | ||
7 | - * @param {Function} comparator The comparator invoked per element. | ||
8 | - * @returns {boolean} Returns `true` if `target` is found, else `false`. | ||
9 | - */ | ||
10 | -function arrayIncludesWith(array, value, comparator) { | ||
11 | - var index = -1, | ||
12 | - length = array == null ? 0 : array.length; | ||
13 | - | ||
14 | - while (++index < length) { | ||
15 | - if (comparator(value, array[index])) { | ||
16 | - return true; | ||
17 | - } | ||
18 | - } | ||
19 | - return false; | ||
20 | -} | ||
21 | - | ||
22 | -module.exports = arrayIncludesWith; |
node_modules/lodash/_arrayLikeKeys.js
已删除
100644 → 0
1 | -var baseTimes = require('./_baseTimes'), | ||
2 | - isArguments = require('./isArguments'), | ||
3 | - isArray = require('./isArray'), | ||
4 | - isBuffer = require('./isBuffer'), | ||
5 | - isIndex = require('./_isIndex'), | ||
6 | - isTypedArray = require('./isTypedArray'); | ||
7 | - | ||
8 | -/** Used for built-in method references. */ | ||
9 | -var objectProto = Object.prototype; | ||
10 | - | ||
11 | -/** Used to check objects for own properties. */ | ||
12 | -var hasOwnProperty = objectProto.hasOwnProperty; | ||
13 | - | ||
14 | -/** | ||
15 | - * Creates an array of the enumerable property names of the array-like `value`. | ||
16 | - * | ||
17 | - * @private | ||
18 | - * @param {*} value The value to query. | ||
19 | - * @param {boolean} inherited Specify returning inherited property names. | ||
20 | - * @returns {Array} Returns the array of property names. | ||
21 | - */ | ||
22 | -function arrayLikeKeys(value, inherited) { | ||
23 | - var isArr = isArray(value), | ||
24 | - isArg = !isArr && isArguments(value), | ||
25 | - isBuff = !isArr && !isArg && isBuffer(value), | ||
26 | - isType = !isArr && !isArg && !isBuff && isTypedArray(value), | ||
27 | - skipIndexes = isArr || isArg || isBuff || isType, | ||
28 | - result = skipIndexes ? baseTimes(value.length, String) : [], | ||
29 | - length = result.length; | ||
30 | - | ||
31 | - for (var key in value) { | ||
32 | - if ((inherited || hasOwnProperty.call(value, key)) && | ||
33 | - !(skipIndexes && ( | ||
34 | - // Safari 9 has enumerable `arguments.length` in strict mode. | ||
35 | - key == 'length' || | ||
36 | - // Node.js 0.10 has enumerable non-index properties on buffers. | ||
37 | - (isBuff && (key == 'offset' || key == 'parent')) || | ||
38 | - // PhantomJS 2 has enumerable non-index properties on typed arrays. | ||
39 | - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || | ||
40 | - // Skip index properties. | ||
41 | - isIndex(key, length) | ||
42 | - ))) { | ||
43 | - result.push(key); | ||
44 | - } | ||
45 | - } | ||
46 | - return result; | ||
47 | -} | ||
48 | - | ||
49 | -module.exports = arrayLikeKeys; |
node_modules/lodash/_arrayMap.js
已删除
100644 → 0
1 | -/** | ||
2 | - * A specialized version of `_.map` for arrays without support for iteratee | ||
3 | - * shorthands. | ||
4 | - * | ||
5 | - * @private | ||
6 | - * @param {Array} [array] The array to iterate over. | ||
7 | - * @param {Function} iteratee The function invoked per iteration. | ||
8 | - * @returns {Array} Returns the new mapped array. | ||
9 | - */ | ||
10 | -function arrayMap(array, iteratee) { | ||
11 | - var index = -1, | ||
12 | - length = array == null ? 0 : array.length, | ||
13 | - result = Array(length); | ||
14 | - | ||
15 | - while (++index < length) { | ||
16 | - result[index] = iteratee(array[index], index, array); | ||
17 | - } | ||
18 | - return result; | ||
19 | -} | ||
20 | - | ||
21 | -module.exports = arrayMap; |
node_modules/lodash/_arrayPush.js
已删除
100644 → 0
1 | -/** | ||
2 | - * Appends the elements of `values` to `array`. | ||
3 | - * | ||
4 | - * @private | ||
5 | - * @param {Array} array The array to modify. | ||
6 | - * @param {Array} values The values to append. | ||
7 | - * @returns {Array} Returns `array`. | ||
8 | - */ | ||
9 | -function arrayPush(array, values) { | ||
10 | - var index = -1, | ||
11 | - length = values.length, | ||
12 | - offset = array.length; | ||
13 | - | ||
14 | - while (++index < length) { | ||
15 | - array[offset + index] = values[index]; | ||
16 | - } | ||
17 | - return array; | ||
18 | -} | ||
19 | - | ||
20 | -module.exports = arrayPush; |
node_modules/lodash/_arrayReduce.js
已删除
100644 → 0
1 | -/** | ||
2 | - * A specialized version of `_.reduce` for arrays without support for | ||
3 | - * iteratee shorthands. | ||
4 | - * | ||
5 | - * @private | ||
6 | - * @param {Array} [array] The array to iterate over. | ||
7 | - * @param {Function} iteratee The function invoked per iteration. | ||
8 | - * @param {*} [accumulator] The initial value. | ||
9 | - * @param {boolean} [initAccum] Specify using the first element of `array` as | ||
10 | - * the initial value. | ||
11 | - * @returns {*} Returns the accumulated value. | ||
12 | - */ | ||
13 | -function arrayReduce(array, iteratee, accumulator, initAccum) { | ||
14 | - var index = -1, | ||
15 | - length = array == null ? 0 : array.length; | ||
16 | - | ||
17 | - if (initAccum && length) { | ||
18 | - accumulator = array[++index]; | ||
19 | - } | ||
20 | - while (++index < length) { | ||
21 | - accumulator = iteratee(accumulator, array[index], index, array); | ||
22 | - } | ||
23 | - return accumulator; | ||
24 | -} | ||
25 | - | ||
26 | -module.exports = arrayReduce; |
node_modules/lodash/_arrayReduceRight.js
已删除
100644 → 0
1 | -/** | ||
2 | - * A specialized version of `_.reduceRight` for arrays without support for | ||
3 | - * iteratee shorthands. | ||
4 | - * | ||
5 | - * @private | ||
6 | - * @param {Array} [array] The array to iterate over. | ||
7 | - * @param {Function} iteratee The function invoked per iteration. | ||
8 | - * @param {*} [accumulator] The initial value. | ||
9 | - * @param {boolean} [initAccum] Specify using the last element of `array` as | ||
10 | - * the initial value. | ||
11 | - * @returns {*} Returns the accumulated value. | ||
12 | - */ | ||
13 | -function arrayReduceRight(array, iteratee, accumulator, initAccum) { | ||
14 | - var length = array == null ? 0 : array.length; | ||
15 | - if (initAccum && length) { | ||
16 | - accumulator = array[--length]; | ||
17 | - } | ||
18 | - while (length--) { | ||
19 | - accumulator = iteratee(accumulator, array[length], length, array); | ||
20 | - } | ||
21 | - return accumulator; | ||
22 | -} | ||
23 | - | ||
24 | -module.exports = arrayReduceRight; |
node_modules/lodash/_arraySample.js
已删除
100644 → 0
1 | -var baseRandom = require('./_baseRandom'); | ||
2 | - | ||
3 | -/** | ||
4 | - * A specialized version of `_.sample` for arrays. | ||
5 | - * | ||
6 | - * @private | ||
7 | - * @param {Array} array The array to sample. | ||
8 | - * @returns {*} Returns the random element. | ||
9 | - */ | ||
10 | -function arraySample(array) { | ||
11 | - var length = array.length; | ||
12 | - return length ? array[baseRandom(0, length - 1)] : undefined; | ||
13 | -} | ||
14 | - | ||
15 | -module.exports = arraySample; |
node_modules/lodash/_arraySampleSize.js
已删除
100644 → 0
1 | -var baseClamp = require('./_baseClamp'), | ||
2 | - copyArray = require('./_copyArray'), | ||
3 | - shuffleSelf = require('./_shuffleSelf'); | ||
4 | - | ||
5 | -/** | ||
6 | - * A specialized version of `_.sampleSize` for arrays. | ||
7 | - * | ||
8 | - * @private | ||
9 | - * @param {Array} array The array to sample. | ||
10 | - * @param {number} n The number of elements to sample. | ||
11 | - * @returns {Array} Returns the random elements. | ||
12 | - */ | ||
13 | -function arraySampleSize(array, n) { | ||
14 | - return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); | ||
15 | -} | ||
16 | - | ||
17 | -module.exports = arraySampleSize; |
node_modules/lodash/_arrayShuffle.js
已删除
100644 → 0
1 | -var copyArray = require('./_copyArray'), | ||
2 | - shuffleSelf = require('./_shuffleSelf'); | ||
3 | - | ||
4 | -/** | ||
5 | - * A specialized version of `_.shuffle` for arrays. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Array} array The array to shuffle. | ||
9 | - * @returns {Array} Returns the new shuffled array. | ||
10 | - */ | ||
11 | -function arrayShuffle(array) { | ||
12 | - return shuffleSelf(copyArray(array)); | ||
13 | -} | ||
14 | - | ||
15 | -module.exports = arrayShuffle; |
node_modules/lodash/_arraySome.js
已删除
100644 → 0
1 | -/** | ||
2 | - * A specialized version of `_.some` for arrays without support for iteratee | ||
3 | - * shorthands. | ||
4 | - * | ||
5 | - * @private | ||
6 | - * @param {Array} [array] The array to iterate over. | ||
7 | - * @param {Function} predicate The function invoked per iteration. | ||
8 | - * @returns {boolean} Returns `true` if any element passes the predicate check, | ||
9 | - * else `false`. | ||
10 | - */ | ||
11 | -function arraySome(array, predicate) { | ||
12 | - var index = -1, | ||
13 | - length = array == null ? 0 : array.length; | ||
14 | - | ||
15 | - while (++index < length) { | ||
16 | - if (predicate(array[index], index, array)) { | ||
17 | - return true; | ||
18 | - } | ||
19 | - } | ||
20 | - return false; | ||
21 | -} | ||
22 | - | ||
23 | -module.exports = arraySome; |
node_modules/lodash/_asciiSize.js
已删除
100644 → 0
1 | -var baseProperty = require('./_baseProperty'); | ||
2 | - | ||
3 | -/** | ||
4 | - * Gets the size of an ASCII `string`. | ||
5 | - * | ||
6 | - * @private | ||
7 | - * @param {string} string The string inspect. | ||
8 | - * @returns {number} Returns the string size. | ||
9 | - */ | ||
10 | -var asciiSize = baseProperty('length'); | ||
11 | - | ||
12 | -module.exports = asciiSize; |
node_modules/lodash/_asciiToArray.js
已删除
100644 → 0
node_modules/lodash/_asciiWords.js
已删除
100644 → 0
1 | -/** Used to match words composed of alphanumeric characters. */ | ||
2 | -var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; | ||
3 | - | ||
4 | -/** | ||
5 | - * Splits an ASCII `string` into an array of its words. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {string} The string to inspect. | ||
9 | - * @returns {Array} Returns the words of `string`. | ||
10 | - */ | ||
11 | -function asciiWords(string) { | ||
12 | - return string.match(reAsciiWord) || []; | ||
13 | -} | ||
14 | - | ||
15 | -module.exports = asciiWords; |
node_modules/lodash/_assignMergeValue.js
已删除
100644 → 0
1 | -var baseAssignValue = require('./_baseAssignValue'), | ||
2 | - eq = require('./eq'); | ||
3 | - | ||
4 | -/** | ||
5 | - * This function is like `assignValue` except that it doesn't assign | ||
6 | - * `undefined` values. | ||
7 | - * | ||
8 | - * @private | ||
9 | - * @param {Object} object The object to modify. | ||
10 | - * @param {string} key The key of the property to assign. | ||
11 | - * @param {*} value The value to assign. | ||
12 | - */ | ||
13 | -function assignMergeValue(object, key, value) { | ||
14 | - if ((value !== undefined && !eq(object[key], value)) || | ||
15 | - (value === undefined && !(key in object))) { | ||
16 | - baseAssignValue(object, key, value); | ||
17 | - } | ||
18 | -} | ||
19 | - | ||
20 | -module.exports = assignMergeValue; |
node_modules/lodash/_assignValue.js
已删除
100644 → 0
1 | -var baseAssignValue = require('./_baseAssignValue'), | ||
2 | - eq = require('./eq'); | ||
3 | - | ||
4 | -/** Used for built-in method references. */ | ||
5 | -var objectProto = Object.prototype; | ||
6 | - | ||
7 | -/** Used to check objects for own properties. */ | ||
8 | -var hasOwnProperty = objectProto.hasOwnProperty; | ||
9 | - | ||
10 | -/** | ||
11 | - * Assigns `value` to `key` of `object` if the existing value is not equivalent | ||
12 | - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) | ||
13 | - * for equality comparisons. | ||
14 | - * | ||
15 | - * @private | ||
16 | - * @param {Object} object The object to modify. | ||
17 | - * @param {string} key The key of the property to assign. | ||
18 | - * @param {*} value The value to assign. | ||
19 | - */ | ||
20 | -function assignValue(object, key, value) { | ||
21 | - var objValue = object[key]; | ||
22 | - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || | ||
23 | - (value === undefined && !(key in object))) { | ||
24 | - baseAssignValue(object, key, value); | ||
25 | - } | ||
26 | -} | ||
27 | - | ||
28 | -module.exports = assignValue; |
node_modules/lodash/_assocIndexOf.js
已删除
100644 → 0
1 | -var eq = require('./eq'); | ||
2 | - | ||
3 | -/** | ||
4 | - * Gets the index at which the `key` is found in `array` of key-value pairs. | ||
5 | - * | ||
6 | - * @private | ||
7 | - * @param {Array} array The array to inspect. | ||
8 | - * @param {*} key The key to search for. | ||
9 | - * @returns {number} Returns the index of the matched value, else `-1`. | ||
10 | - */ | ||
11 | -function assocIndexOf(array, key) { | ||
12 | - var length = array.length; | ||
13 | - while (length--) { | ||
14 | - if (eq(array[length][0], key)) { | ||
15 | - return length; | ||
16 | - } | ||
17 | - } | ||
18 | - return -1; | ||
19 | -} | ||
20 | - | ||
21 | -module.exports = assocIndexOf; |
node_modules/lodash/_baseAggregator.js
已删除
100644 → 0
1 | -var baseEach = require('./_baseEach'); | ||
2 | - | ||
3 | -/** | ||
4 | - * Aggregates elements of `collection` on `accumulator` with keys transformed | ||
5 | - * by `iteratee` and values set by `setter`. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Array|Object} collection The collection to iterate over. | ||
9 | - * @param {Function} setter The function to set `accumulator` values. | ||
10 | - * @param {Function} iteratee The iteratee to transform keys. | ||
11 | - * @param {Object} accumulator The initial aggregated object. | ||
12 | - * @returns {Function} Returns `accumulator`. | ||
13 | - */ | ||
14 | -function baseAggregator(collection, setter, iteratee, accumulator) { | ||
15 | - baseEach(collection, function(value, key, collection) { | ||
16 | - setter(accumulator, value, iteratee(value), collection); | ||
17 | - }); | ||
18 | - return accumulator; | ||
19 | -} | ||
20 | - | ||
21 | -module.exports = baseAggregator; |
node_modules/lodash/_baseAssign.js
已删除
100644 → 0
1 | -var copyObject = require('./_copyObject'), | ||
2 | - keys = require('./keys'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.assign` without support for multiple sources | ||
6 | - * or `customizer` functions. | ||
7 | - * | ||
8 | - * @private | ||
9 | - * @param {Object} object The destination object. | ||
10 | - * @param {Object} source The source object. | ||
11 | - * @returns {Object} Returns `object`. | ||
12 | - */ | ||
13 | -function baseAssign(object, source) { | ||
14 | - return object && copyObject(source, keys(source), object); | ||
15 | -} | ||
16 | - | ||
17 | -module.exports = baseAssign; |
node_modules/lodash/_baseAssignIn.js
已删除
100644 → 0
1 | -var copyObject = require('./_copyObject'), | ||
2 | - keysIn = require('./keysIn'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.assignIn` without support for multiple sources | ||
6 | - * or `customizer` functions. | ||
7 | - * | ||
8 | - * @private | ||
9 | - * @param {Object} object The destination object. | ||
10 | - * @param {Object} source The source object. | ||
11 | - * @returns {Object} Returns `object`. | ||
12 | - */ | ||
13 | -function baseAssignIn(object, source) { | ||
14 | - return object && copyObject(source, keysIn(source), object); | ||
15 | -} | ||
16 | - | ||
17 | -module.exports = baseAssignIn; |
node_modules/lodash/_baseAssignValue.js
已删除
100644 → 0
1 | -var defineProperty = require('./_defineProperty'); | ||
2 | - | ||
3 | -/** | ||
4 | - * The base implementation of `assignValue` and `assignMergeValue` without | ||
5 | - * value checks. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Object} object The object to modify. | ||
9 | - * @param {string} key The key of the property to assign. | ||
10 | - * @param {*} value The value to assign. | ||
11 | - */ | ||
12 | -function baseAssignValue(object, key, value) { | ||
13 | - if (key == '__proto__' && defineProperty) { | ||
14 | - defineProperty(object, key, { | ||
15 | - 'configurable': true, | ||
16 | - 'enumerable': true, | ||
17 | - 'value': value, | ||
18 | - 'writable': true | ||
19 | - }); | ||
20 | - } else { | ||
21 | - object[key] = value; | ||
22 | - } | ||
23 | -} | ||
24 | - | ||
25 | -module.exports = baseAssignValue; |
node_modules/lodash/_baseAt.js
已删除
100644 → 0
1 | -var get = require('./get'); | ||
2 | - | ||
3 | -/** | ||
4 | - * The base implementation of `_.at` without support for individual paths. | ||
5 | - * | ||
6 | - * @private | ||
7 | - * @param {Object} object The object to iterate over. | ||
8 | - * @param {string[]} paths The property paths to pick. | ||
9 | - * @returns {Array} Returns the picked elements. | ||
10 | - */ | ||
11 | -function baseAt(object, paths) { | ||
12 | - var index = -1, | ||
13 | - length = paths.length, | ||
14 | - result = Array(length), | ||
15 | - skip = object == null; | ||
16 | - | ||
17 | - while (++index < length) { | ||
18 | - result[index] = skip ? undefined : get(object, paths[index]); | ||
19 | - } | ||
20 | - return result; | ||
21 | -} | ||
22 | - | ||
23 | -module.exports = baseAt; |
node_modules/lodash/_baseClamp.js
已删除
100644 → 0
1 | -/** | ||
2 | - * The base implementation of `_.clamp` which doesn't coerce arguments. | ||
3 | - * | ||
4 | - * @private | ||
5 | - * @param {number} number The number to clamp. | ||
6 | - * @param {number} [lower] The lower bound. | ||
7 | - * @param {number} upper The upper bound. | ||
8 | - * @returns {number} Returns the clamped number. | ||
9 | - */ | ||
10 | -function baseClamp(number, lower, upper) { | ||
11 | - if (number === number) { | ||
12 | - if (upper !== undefined) { | ||
13 | - number = number <= upper ? number : upper; | ||
14 | - } | ||
15 | - if (lower !== undefined) { | ||
16 | - number = number >= lower ? number : lower; | ||
17 | - } | ||
18 | - } | ||
19 | - return number; | ||
20 | -} | ||
21 | - | ||
22 | -module.exports = baseClamp; |
node_modules/lodash/_baseClone.js
已删除
100644 → 0
1 | -var Stack = require('./_Stack'), | ||
2 | - arrayEach = require('./_arrayEach'), | ||
3 | - assignValue = require('./_assignValue'), | ||
4 | - baseAssign = require('./_baseAssign'), | ||
5 | - baseAssignIn = require('./_baseAssignIn'), | ||
6 | - cloneBuffer = require('./_cloneBuffer'), | ||
7 | - copyArray = require('./_copyArray'), | ||
8 | - copySymbols = require('./_copySymbols'), | ||
9 | - copySymbolsIn = require('./_copySymbolsIn'), | ||
10 | - getAllKeys = require('./_getAllKeys'), | ||
11 | - getAllKeysIn = require('./_getAllKeysIn'), | ||
12 | - getTag = require('./_getTag'), | ||
13 | - initCloneArray = require('./_initCloneArray'), | ||
14 | - initCloneByTag = require('./_initCloneByTag'), | ||
15 | - initCloneObject = require('./_initCloneObject'), | ||
16 | - isArray = require('./isArray'), | ||
17 | - isBuffer = require('./isBuffer'), | ||
18 | - isMap = require('./isMap'), | ||
19 | - isObject = require('./isObject'), | ||
20 | - isSet = require('./isSet'), | ||
21 | - keys = require('./keys'), | ||
22 | - keysIn = require('./keysIn'); | ||
23 | - | ||
24 | -/** Used to compose bitmasks for cloning. */ | ||
25 | -var CLONE_DEEP_FLAG = 1, | ||
26 | - CLONE_FLAT_FLAG = 2, | ||
27 | - CLONE_SYMBOLS_FLAG = 4; | ||
28 | - | ||
29 | -/** `Object#toString` result references. */ | ||
30 | -var argsTag = '[object Arguments]', | ||
31 | - arrayTag = '[object Array]', | ||
32 | - boolTag = '[object Boolean]', | ||
33 | - dateTag = '[object Date]', | ||
34 | - errorTag = '[object Error]', | ||
35 | - funcTag = '[object Function]', | ||
36 | - genTag = '[object GeneratorFunction]', | ||
37 | - mapTag = '[object Map]', | ||
38 | - numberTag = '[object Number]', | ||
39 | - objectTag = '[object Object]', | ||
40 | - regexpTag = '[object RegExp]', | ||
41 | - setTag = '[object Set]', | ||
42 | - stringTag = '[object String]', | ||
43 | - symbolTag = '[object Symbol]', | ||
44 | - weakMapTag = '[object WeakMap]'; | ||
45 | - | ||
46 | -var arrayBufferTag = '[object ArrayBuffer]', | ||
47 | - dataViewTag = '[object DataView]', | ||
48 | - float32Tag = '[object Float32Array]', | ||
49 | - float64Tag = '[object Float64Array]', | ||
50 | - int8Tag = '[object Int8Array]', | ||
51 | - int16Tag = '[object Int16Array]', | ||
52 | - int32Tag = '[object Int32Array]', | ||
53 | - uint8Tag = '[object Uint8Array]', | ||
54 | - uint8ClampedTag = '[object Uint8ClampedArray]', | ||
55 | - uint16Tag = '[object Uint16Array]', | ||
56 | - uint32Tag = '[object Uint32Array]'; | ||
57 | - | ||
58 | -/** Used to identify `toStringTag` values supported by `_.clone`. */ | ||
59 | -var cloneableTags = {}; | ||
60 | -cloneableTags[argsTag] = cloneableTags[arrayTag] = | ||
61 | -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = | ||
62 | -cloneableTags[boolTag] = cloneableTags[dateTag] = | ||
63 | -cloneableTags[float32Tag] = cloneableTags[float64Tag] = | ||
64 | -cloneableTags[int8Tag] = cloneableTags[int16Tag] = | ||
65 | -cloneableTags[int32Tag] = cloneableTags[mapTag] = | ||
66 | -cloneableTags[numberTag] = cloneableTags[objectTag] = | ||
67 | -cloneableTags[regexpTag] = cloneableTags[setTag] = | ||
68 | -cloneableTags[stringTag] = cloneableTags[symbolTag] = | ||
69 | -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = | ||
70 | -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; | ||
71 | -cloneableTags[errorTag] = cloneableTags[funcTag] = | ||
72 | -cloneableTags[weakMapTag] = false; | ||
73 | - | ||
74 | -/** | ||
75 | - * The base implementation of `_.clone` and `_.cloneDeep` which tracks | ||
76 | - * traversed objects. | ||
77 | - * | ||
78 | - * @private | ||
79 | - * @param {*} value The value to clone. | ||
80 | - * @param {boolean} bitmask The bitmask flags. | ||
81 | - * 1 - Deep clone | ||
82 | - * 2 - Flatten inherited properties | ||
83 | - * 4 - Clone symbols | ||
84 | - * @param {Function} [customizer] The function to customize cloning. | ||
85 | - * @param {string} [key] The key of `value`. | ||
86 | - * @param {Object} [object] The parent object of `value`. | ||
87 | - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. | ||
88 | - * @returns {*} Returns the cloned value. | ||
89 | - */ | ||
90 | -function baseClone(value, bitmask, customizer, key, object, stack) { | ||
91 | - var result, | ||
92 | - isDeep = bitmask & CLONE_DEEP_FLAG, | ||
93 | - isFlat = bitmask & CLONE_FLAT_FLAG, | ||
94 | - isFull = bitmask & CLONE_SYMBOLS_FLAG; | ||
95 | - | ||
96 | - if (customizer) { | ||
97 | - result = object ? customizer(value, key, object, stack) : customizer(value); | ||
98 | - } | ||
99 | - if (result !== undefined) { | ||
100 | - return result; | ||
101 | - } | ||
102 | - if (!isObject(value)) { | ||
103 | - return value; | ||
104 | - } | ||
105 | - var isArr = isArray(value); | ||
106 | - if (isArr) { | ||
107 | - result = initCloneArray(value); | ||
108 | - if (!isDeep) { | ||
109 | - return copyArray(value, result); | ||
110 | - } | ||
111 | - } else { | ||
112 | - var tag = getTag(value), | ||
113 | - isFunc = tag == funcTag || tag == genTag; | ||
114 | - | ||
115 | - if (isBuffer(value)) { | ||
116 | - return cloneBuffer(value, isDeep); | ||
117 | - } | ||
118 | - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { | ||
119 | - result = (isFlat || isFunc) ? {} : initCloneObject(value); | ||
120 | - if (!isDeep) { | ||
121 | - return isFlat | ||
122 | - ? copySymbolsIn(value, baseAssignIn(result, value)) | ||
123 | - : copySymbols(value, baseAssign(result, value)); | ||
124 | - } | ||
125 | - } else { | ||
126 | - if (!cloneableTags[tag]) { | ||
127 | - return object ? value : {}; | ||
128 | - } | ||
129 | - result = initCloneByTag(value, tag, isDeep); | ||
130 | - } | ||
131 | - } | ||
132 | - // Check for circular references and return its corresponding clone. | ||
133 | - stack || (stack = new Stack); | ||
134 | - var stacked = stack.get(value); | ||
135 | - if (stacked) { | ||
136 | - return stacked; | ||
137 | - } | ||
138 | - stack.set(value, result); | ||
139 | - | ||
140 | - if (isSet(value)) { | ||
141 | - value.forEach(function(subValue) { | ||
142 | - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); | ||
143 | - }); | ||
144 | - } else if (isMap(value)) { | ||
145 | - value.forEach(function(subValue, key) { | ||
146 | - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); | ||
147 | - }); | ||
148 | - } | ||
149 | - | ||
150 | - var keysFunc = isFull | ||
151 | - ? (isFlat ? getAllKeysIn : getAllKeys) | ||
152 | - : (isFlat ? keysIn : keys); | ||
153 | - | ||
154 | - var props = isArr ? undefined : keysFunc(value); | ||
155 | - arrayEach(props || value, function(subValue, key) { | ||
156 | - if (props) { | ||
157 | - key = subValue; | ||
158 | - subValue = value[key]; | ||
159 | - } | ||
160 | - // Recursively populate clone (susceptible to call stack limits). | ||
161 | - assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); | ||
162 | - }); | ||
163 | - return result; | ||
164 | -} | ||
165 | - | ||
166 | -module.exports = baseClone; |
node_modules/lodash/_baseConforms.js
已删除
100644 → 0
1 | -var baseConformsTo = require('./_baseConformsTo'), | ||
2 | - keys = require('./keys'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.conforms` which doesn't clone `source`. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Object} source The object of property predicates to conform to. | ||
9 | - * @returns {Function} Returns the new spec function. | ||
10 | - */ | ||
11 | -function baseConforms(source) { | ||
12 | - var props = keys(source); | ||
13 | - return function(object) { | ||
14 | - return baseConformsTo(object, source, props); | ||
15 | - }; | ||
16 | -} | ||
17 | - | ||
18 | -module.exports = baseConforms; |
node_modules/lodash/_baseConformsTo.js
已删除
100644 → 0
1 | -/** | ||
2 | - * The base implementation of `_.conformsTo` which accepts `props` to check. | ||
3 | - * | ||
4 | - * @private | ||
5 | - * @param {Object} object The object to inspect. | ||
6 | - * @param {Object} source The object of property predicates to conform to. | ||
7 | - * @returns {boolean} Returns `true` if `object` conforms, else `false`. | ||
8 | - */ | ||
9 | -function baseConformsTo(object, source, props) { | ||
10 | - var length = props.length; | ||
11 | - if (object == null) { | ||
12 | - return !length; | ||
13 | - } | ||
14 | - object = Object(object); | ||
15 | - while (length--) { | ||
16 | - var key = props[length], | ||
17 | - predicate = source[key], | ||
18 | - value = object[key]; | ||
19 | - | ||
20 | - if ((value === undefined && !(key in object)) || !predicate(value)) { | ||
21 | - return false; | ||
22 | - } | ||
23 | - } | ||
24 | - return true; | ||
25 | -} | ||
26 | - | ||
27 | -module.exports = baseConformsTo; |
node_modules/lodash/_baseCreate.js
已删除
100644 → 0
1 | -var isObject = require('./isObject'); | ||
2 | - | ||
3 | -/** Built-in value references. */ | ||
4 | -var objectCreate = Object.create; | ||
5 | - | ||
6 | -/** | ||
7 | - * The base implementation of `_.create` without support for assigning | ||
8 | - * properties to the created object. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @param {Object} proto The object to inherit from. | ||
12 | - * @returns {Object} Returns the new object. | ||
13 | - */ | ||
14 | -var baseCreate = (function() { | ||
15 | - function object() {} | ||
16 | - return function(proto) { | ||
17 | - if (!isObject(proto)) { | ||
18 | - return {}; | ||
19 | - } | ||
20 | - if (objectCreate) { | ||
21 | - return objectCreate(proto); | ||
22 | - } | ||
23 | - object.prototype = proto; | ||
24 | - var result = new object; | ||
25 | - object.prototype = undefined; | ||
26 | - return result; | ||
27 | - }; | ||
28 | -}()); | ||
29 | - | ||
30 | -module.exports = baseCreate; |
node_modules/lodash/_baseDelay.js
已删除
100644 → 0
1 | -/** Error message constants. */ | ||
2 | -var FUNC_ERROR_TEXT = 'Expected a function'; | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.delay` and `_.defer` which accepts `args` | ||
6 | - * to provide to `func`. | ||
7 | - * | ||
8 | - * @private | ||
9 | - * @param {Function} func The function to delay. | ||
10 | - * @param {number} wait The number of milliseconds to delay invocation. | ||
11 | - * @param {Array} args The arguments to provide to `func`. | ||
12 | - * @returns {number|Object} Returns the timer id or timeout object. | ||
13 | - */ | ||
14 | -function baseDelay(func, wait, args) { | ||
15 | - if (typeof func != 'function') { | ||
16 | - throw new TypeError(FUNC_ERROR_TEXT); | ||
17 | - } | ||
18 | - return setTimeout(function() { func.apply(undefined, args); }, wait); | ||
19 | -} | ||
20 | - | ||
21 | -module.exports = baseDelay; |
node_modules/lodash/_baseDifference.js
已删除
100644 → 0
1 | -var SetCache = require('./_SetCache'), | ||
2 | - arrayIncludes = require('./_arrayIncludes'), | ||
3 | - arrayIncludesWith = require('./_arrayIncludesWith'), | ||
4 | - arrayMap = require('./_arrayMap'), | ||
5 | - baseUnary = require('./_baseUnary'), | ||
6 | - cacheHas = require('./_cacheHas'); | ||
7 | - | ||
8 | -/** Used as the size to enable large array optimizations. */ | ||
9 | -var LARGE_ARRAY_SIZE = 200; | ||
10 | - | ||
11 | -/** | ||
12 | - * The base implementation of methods like `_.difference` without support | ||
13 | - * for excluding multiple arrays or iteratee shorthands. | ||
14 | - * | ||
15 | - * @private | ||
16 | - * @param {Array} array The array to inspect. | ||
17 | - * @param {Array} values The values to exclude. | ||
18 | - * @param {Function} [iteratee] The iteratee invoked per element. | ||
19 | - * @param {Function} [comparator] The comparator invoked per element. | ||
20 | - * @returns {Array} Returns the new array of filtered values. | ||
21 | - */ | ||
22 | -function baseDifference(array, values, iteratee, comparator) { | ||
23 | - var index = -1, | ||
24 | - includes = arrayIncludes, | ||
25 | - isCommon = true, | ||
26 | - length = array.length, | ||
27 | - result = [], | ||
28 | - valuesLength = values.length; | ||
29 | - | ||
30 | - if (!length) { | ||
31 | - return result; | ||
32 | - } | ||
33 | - if (iteratee) { | ||
34 | - values = arrayMap(values, baseUnary(iteratee)); | ||
35 | - } | ||
36 | - if (comparator) { | ||
37 | - includes = arrayIncludesWith; | ||
38 | - isCommon = false; | ||
39 | - } | ||
40 | - else if (values.length >= LARGE_ARRAY_SIZE) { | ||
41 | - includes = cacheHas; | ||
42 | - isCommon = false; | ||
43 | - values = new SetCache(values); | ||
44 | - } | ||
45 | - outer: | ||
46 | - while (++index < length) { | ||
47 | - var value = array[index], | ||
48 | - computed = iteratee == null ? value : iteratee(value); | ||
49 | - | ||
50 | - value = (comparator || value !== 0) ? value : 0; | ||
51 | - if (isCommon && computed === computed) { | ||
52 | - var valuesIndex = valuesLength; | ||
53 | - while (valuesIndex--) { | ||
54 | - if (values[valuesIndex] === computed) { | ||
55 | - continue outer; | ||
56 | - } | ||
57 | - } | ||
58 | - result.push(value); | ||
59 | - } | ||
60 | - else if (!includes(values, computed, comparator)) { | ||
61 | - result.push(value); | ||
62 | - } | ||
63 | - } | ||
64 | - return result; | ||
65 | -} | ||
66 | - | ||
67 | -module.exports = baseDifference; |
node_modules/lodash/_baseEach.js
已删除
100644 → 0
1 | -var baseForOwn = require('./_baseForOwn'), | ||
2 | - createBaseEach = require('./_createBaseEach'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.forEach` without support for iteratee shorthands. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Array|Object} collection The collection to iterate over. | ||
9 | - * @param {Function} iteratee The function invoked per iteration. | ||
10 | - * @returns {Array|Object} Returns `collection`. | ||
11 | - */ | ||
12 | -var baseEach = createBaseEach(baseForOwn); | ||
13 | - | ||
14 | -module.exports = baseEach; |
node_modules/lodash/_baseEachRight.js
已删除
100644 → 0
1 | -var baseForOwnRight = require('./_baseForOwnRight'), | ||
2 | - createBaseEach = require('./_createBaseEach'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.forEachRight` without support for iteratee shorthands. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Array|Object} collection The collection to iterate over. | ||
9 | - * @param {Function} iteratee The function invoked per iteration. | ||
10 | - * @returns {Array|Object} Returns `collection`. | ||
11 | - */ | ||
12 | -var baseEachRight = createBaseEach(baseForOwnRight, true); | ||
13 | - | ||
14 | -module.exports = baseEachRight; |
node_modules/lodash/_baseEvery.js
已删除
100644 → 0
1 | -var baseEach = require('./_baseEach'); | ||
2 | - | ||
3 | -/** | ||
4 | - * The base implementation of `_.every` without support for iteratee shorthands. | ||
5 | - * | ||
6 | - * @private | ||
7 | - * @param {Array|Object} collection The collection to iterate over. | ||
8 | - * @param {Function} predicate The function invoked per iteration. | ||
9 | - * @returns {boolean} Returns `true` if all elements pass the predicate check, | ||
10 | - * else `false` | ||
11 | - */ | ||
12 | -function baseEvery(collection, predicate) { | ||
13 | - var result = true; | ||
14 | - baseEach(collection, function(value, index, collection) { | ||
15 | - result = !!predicate(value, index, collection); | ||
16 | - return result; | ||
17 | - }); | ||
18 | - return result; | ||
19 | -} | ||
20 | - | ||
21 | -module.exports = baseEvery; |
node_modules/lodash/_baseExtremum.js
已删除
100644 → 0
1 | -var isSymbol = require('./isSymbol'); | ||
2 | - | ||
3 | -/** | ||
4 | - * The base implementation of methods like `_.max` and `_.min` which accepts a | ||
5 | - * `comparator` to determine the extremum value. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Array} array The array to iterate over. | ||
9 | - * @param {Function} iteratee The iteratee invoked per iteration. | ||
10 | - * @param {Function} comparator The comparator used to compare values. | ||
11 | - * @returns {*} Returns the extremum value. | ||
12 | - */ | ||
13 | -function baseExtremum(array, iteratee, comparator) { | ||
14 | - var index = -1, | ||
15 | - length = array.length; | ||
16 | - | ||
17 | - while (++index < length) { | ||
18 | - var value = array[index], | ||
19 | - current = iteratee(value); | ||
20 | - | ||
21 | - if (current != null && (computed === undefined | ||
22 | - ? (current === current && !isSymbol(current)) | ||
23 | - : comparator(current, computed) | ||
24 | - )) { | ||
25 | - var computed = current, | ||
26 | - result = value; | ||
27 | - } | ||
28 | - } | ||
29 | - return result; | ||
30 | -} | ||
31 | - | ||
32 | -module.exports = baseExtremum; |
node_modules/lodash/_baseFill.js
已删除
100644 → 0
1 | -var toInteger = require('./toInteger'), | ||
2 | - toLength = require('./toLength'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.fill` without an iteratee call guard. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Array} array The array to fill. | ||
9 | - * @param {*} value The value to fill `array` with. | ||
10 | - * @param {number} [start=0] The start position. | ||
11 | - * @param {number} [end=array.length] The end position. | ||
12 | - * @returns {Array} Returns `array`. | ||
13 | - */ | ||
14 | -function baseFill(array, value, start, end) { | ||
15 | - var length = array.length; | ||
16 | - | ||
17 | - start = toInteger(start); | ||
18 | - if (start < 0) { | ||
19 | - start = -start > length ? 0 : (length + start); | ||
20 | - } | ||
21 | - end = (end === undefined || end > length) ? length : toInteger(end); | ||
22 | - if (end < 0) { | ||
23 | - end += length; | ||
24 | - } | ||
25 | - end = start > end ? 0 : toLength(end); | ||
26 | - while (start < end) { | ||
27 | - array[start++] = value; | ||
28 | - } | ||
29 | - return array; | ||
30 | -} | ||
31 | - | ||
32 | -module.exports = baseFill; |
node_modules/lodash/_baseFilter.js
已删除
100644 → 0
1 | -var baseEach = require('./_baseEach'); | ||
2 | - | ||
3 | -/** | ||
4 | - * The base implementation of `_.filter` without support for iteratee shorthands. | ||
5 | - * | ||
6 | - * @private | ||
7 | - * @param {Array|Object} collection The collection to iterate over. | ||
8 | - * @param {Function} predicate The function invoked per iteration. | ||
9 | - * @returns {Array} Returns the new filtered array. | ||
10 | - */ | ||
11 | -function baseFilter(collection, predicate) { | ||
12 | - var result = []; | ||
13 | - baseEach(collection, function(value, index, collection) { | ||
14 | - if (predicate(value, index, collection)) { | ||
15 | - result.push(value); | ||
16 | - } | ||
17 | - }); | ||
18 | - return result; | ||
19 | -} | ||
20 | - | ||
21 | -module.exports = baseFilter; |
node_modules/lodash/_baseFindIndex.js
已删除
100644 → 0
1 | -/** | ||
2 | - * The base implementation of `_.findIndex` and `_.findLastIndex` without | ||
3 | - * support for iteratee shorthands. | ||
4 | - * | ||
5 | - * @private | ||
6 | - * @param {Array} array The array to inspect. | ||
7 | - * @param {Function} predicate The function invoked per iteration. | ||
8 | - * @param {number} fromIndex The index to search from. | ||
9 | - * @param {boolean} [fromRight] Specify iterating from right to left. | ||
10 | - * @returns {number} Returns the index of the matched value, else `-1`. | ||
11 | - */ | ||
12 | -function baseFindIndex(array, predicate, fromIndex, fromRight) { | ||
13 | - var length = array.length, | ||
14 | - index = fromIndex + (fromRight ? 1 : -1); | ||
15 | - | ||
16 | - while ((fromRight ? index-- : ++index < length)) { | ||
17 | - if (predicate(array[index], index, array)) { | ||
18 | - return index; | ||
19 | - } | ||
20 | - } | ||
21 | - return -1; | ||
22 | -} | ||
23 | - | ||
24 | -module.exports = baseFindIndex; |
node_modules/lodash/_baseFindKey.js
已删除
100644 → 0
1 | -/** | ||
2 | - * The base implementation of methods like `_.findKey` and `_.findLastKey`, | ||
3 | - * without support for iteratee shorthands, which iterates over `collection` | ||
4 | - * using `eachFunc`. | ||
5 | - * | ||
6 | - * @private | ||
7 | - * @param {Array|Object} collection The collection to inspect. | ||
8 | - * @param {Function} predicate The function invoked per iteration. | ||
9 | - * @param {Function} eachFunc The function to iterate over `collection`. | ||
10 | - * @returns {*} Returns the found element or its key, else `undefined`. | ||
11 | - */ | ||
12 | -function baseFindKey(collection, predicate, eachFunc) { | ||
13 | - var result; | ||
14 | - eachFunc(collection, function(value, key, collection) { | ||
15 | - if (predicate(value, key, collection)) { | ||
16 | - result = key; | ||
17 | - return false; | ||
18 | - } | ||
19 | - }); | ||
20 | - return result; | ||
21 | -} | ||
22 | - | ||
23 | -module.exports = baseFindKey; |
node_modules/lodash/_baseFlatten.js
已删除
100644 → 0
1 | -var arrayPush = require('./_arrayPush'), | ||
2 | - isFlattenable = require('./_isFlattenable'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.flatten` with support for restricting flattening. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Array} array The array to flatten. | ||
9 | - * @param {number} depth The maximum recursion depth. | ||
10 | - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. | ||
11 | - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. | ||
12 | - * @param {Array} [result=[]] The initial result value. | ||
13 | - * @returns {Array} Returns the new flattened array. | ||
14 | - */ | ||
15 | -function baseFlatten(array, depth, predicate, isStrict, result) { | ||
16 | - var index = -1, | ||
17 | - length = array.length; | ||
18 | - | ||
19 | - predicate || (predicate = isFlattenable); | ||
20 | - result || (result = []); | ||
21 | - | ||
22 | - while (++index < length) { | ||
23 | - var value = array[index]; | ||
24 | - if (depth > 0 && predicate(value)) { | ||
25 | - if (depth > 1) { | ||
26 | - // Recursively flatten arrays (susceptible to call stack limits). | ||
27 | - baseFlatten(value, depth - 1, predicate, isStrict, result); | ||
28 | - } else { | ||
29 | - arrayPush(result, value); | ||
30 | - } | ||
31 | - } else if (!isStrict) { | ||
32 | - result[result.length] = value; | ||
33 | - } | ||
34 | - } | ||
35 | - return result; | ||
36 | -} | ||
37 | - | ||
38 | -module.exports = baseFlatten; |
node_modules/lodash/_baseFor.js
已删除
100644 → 0
1 | -var createBaseFor = require('./_createBaseFor'); | ||
2 | - | ||
3 | -/** | ||
4 | - * The base implementation of `baseForOwn` which iterates over `object` | ||
5 | - * properties returned by `keysFunc` and invokes `iteratee` for each property. | ||
6 | - * Iteratee functions may exit iteration early by explicitly returning `false`. | ||
7 | - * | ||
8 | - * @private | ||
9 | - * @param {Object} object The object to iterate over. | ||
10 | - * @param {Function} iteratee The function invoked per iteration. | ||
11 | - * @param {Function} keysFunc The function to get the keys of `object`. | ||
12 | - * @returns {Object} Returns `object`. | ||
13 | - */ | ||
14 | -var baseFor = createBaseFor(); | ||
15 | - | ||
16 | -module.exports = baseFor; |
node_modules/lodash/_baseForOwn.js
已删除
100644 → 0
1 | -var baseFor = require('./_baseFor'), | ||
2 | - keys = require('./keys'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.forOwn` without support for iteratee shorthands. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Object} object The object to iterate over. | ||
9 | - * @param {Function} iteratee The function invoked per iteration. | ||
10 | - * @returns {Object} Returns `object`. | ||
11 | - */ | ||
12 | -function baseForOwn(object, iteratee) { | ||
13 | - return object && baseFor(object, iteratee, keys); | ||
14 | -} | ||
15 | - | ||
16 | -module.exports = baseForOwn; |
node_modules/lodash/_baseForOwnRight.js
已删除
100644 → 0
1 | -var baseForRight = require('./_baseForRight'), | ||
2 | - keys = require('./keys'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.forOwnRight` without support for iteratee shorthands. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Object} object The object to iterate over. | ||
9 | - * @param {Function} iteratee The function invoked per iteration. | ||
10 | - * @returns {Object} Returns `object`. | ||
11 | - */ | ||
12 | -function baseForOwnRight(object, iteratee) { | ||
13 | - return object && baseForRight(object, iteratee, keys); | ||
14 | -} | ||
15 | - | ||
16 | -module.exports = baseForOwnRight; |
node_modules/lodash/_baseForRight.js
已删除
100644 → 0
1 | -var createBaseFor = require('./_createBaseFor'); | ||
2 | - | ||
3 | -/** | ||
4 | - * This function is like `baseFor` except that it iterates over properties | ||
5 | - * in the opposite order. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Object} object The object to iterate over. | ||
9 | - * @param {Function} iteratee The function invoked per iteration. | ||
10 | - * @param {Function} keysFunc The function to get the keys of `object`. | ||
11 | - * @returns {Object} Returns `object`. | ||
12 | - */ | ||
13 | -var baseForRight = createBaseFor(true); | ||
14 | - | ||
15 | -module.exports = baseForRight; |
node_modules/lodash/_baseFunctions.js
已删除
100644 → 0
1 | -var arrayFilter = require('./_arrayFilter'), | ||
2 | - isFunction = require('./isFunction'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.functions` which creates an array of | ||
6 | - * `object` function property names filtered from `props`. | ||
7 | - * | ||
8 | - * @private | ||
9 | - * @param {Object} object The object to inspect. | ||
10 | - * @param {Array} props The property names to filter. | ||
11 | - * @returns {Array} Returns the function names. | ||
12 | - */ | ||
13 | -function baseFunctions(object, props) { | ||
14 | - return arrayFilter(props, function(key) { | ||
15 | - return isFunction(object[key]); | ||
16 | - }); | ||
17 | -} | ||
18 | - | ||
19 | -module.exports = baseFunctions; |
node_modules/lodash/_baseGet.js
已删除
100644 → 0
1 | -var castPath = require('./_castPath'), | ||
2 | - toKey = require('./_toKey'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.get` without support for default values. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Object} object The object to query. | ||
9 | - * @param {Array|string} path The path of the property to get. | ||
10 | - * @returns {*} Returns the resolved value. | ||
11 | - */ | ||
12 | -function baseGet(object, path) { | ||
13 | - path = castPath(path, object); | ||
14 | - | ||
15 | - var index = 0, | ||
16 | - length = path.length; | ||
17 | - | ||
18 | - while (object != null && index < length) { | ||
19 | - object = object[toKey(path[index++])]; | ||
20 | - } | ||
21 | - return (index && index == length) ? object : undefined; | ||
22 | -} | ||
23 | - | ||
24 | -module.exports = baseGet; |
node_modules/lodash/_baseGetAllKeys.js
已删除
100644 → 0
1 | -var arrayPush = require('./_arrayPush'), | ||
2 | - isArray = require('./isArray'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses | ||
6 | - * `keysFunc` and `symbolsFunc` to get the enumerable property names and | ||
7 | - * symbols of `object`. | ||
8 | - * | ||
9 | - * @private | ||
10 | - * @param {Object} object The object to query. | ||
11 | - * @param {Function} keysFunc The function to get the keys of `object`. | ||
12 | - * @param {Function} symbolsFunc The function to get the symbols of `object`. | ||
13 | - * @returns {Array} Returns the array of property names and symbols. | ||
14 | - */ | ||
15 | -function baseGetAllKeys(object, keysFunc, symbolsFunc) { | ||
16 | - var result = keysFunc(object); | ||
17 | - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); | ||
18 | -} | ||
19 | - | ||
20 | -module.exports = baseGetAllKeys; |
node_modules/lodash/_baseGetTag.js
已删除
100644 → 0
1 | -var Symbol = require('./_Symbol'), | ||
2 | - getRawTag = require('./_getRawTag'), | ||
3 | - objectToString = require('./_objectToString'); | ||
4 | - | ||
5 | -/** `Object#toString` result references. */ | ||
6 | -var nullTag = '[object Null]', | ||
7 | - undefinedTag = '[object Undefined]'; | ||
8 | - | ||
9 | -/** Built-in value references. */ | ||
10 | -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; | ||
11 | - | ||
12 | -/** | ||
13 | - * The base implementation of `getTag` without fallbacks for buggy environments. | ||
14 | - * | ||
15 | - * @private | ||
16 | - * @param {*} value The value to query. | ||
17 | - * @returns {string} Returns the `toStringTag`. | ||
18 | - */ | ||
19 | -function baseGetTag(value) { | ||
20 | - if (value == null) { | ||
21 | - return value === undefined ? undefinedTag : nullTag; | ||
22 | - } | ||
23 | - return (symToStringTag && symToStringTag in Object(value)) | ||
24 | - ? getRawTag(value) | ||
25 | - : objectToString(value); | ||
26 | -} | ||
27 | - | ||
28 | -module.exports = baseGetTag; |
node_modules/lodash/_baseGt.js
已删除
100644 → 0
1 | -/** | ||
2 | - * The base implementation of `_.gt` which doesn't coerce arguments. | ||
3 | - * | ||
4 | - * @private | ||
5 | - * @param {*} value The value to compare. | ||
6 | - * @param {*} other The other value to compare. | ||
7 | - * @returns {boolean} Returns `true` if `value` is greater than `other`, | ||
8 | - * else `false`. | ||
9 | - */ | ||
10 | -function baseGt(value, other) { | ||
11 | - return value > other; | ||
12 | -} | ||
13 | - | ||
14 | -module.exports = baseGt; |
node_modules/lodash/_baseHas.js
已删除
100644 → 0
1 | -/** Used for built-in method references. */ | ||
2 | -var objectProto = Object.prototype; | ||
3 | - | ||
4 | -/** Used to check objects for own properties. */ | ||
5 | -var hasOwnProperty = objectProto.hasOwnProperty; | ||
6 | - | ||
7 | -/** | ||
8 | - * The base implementation of `_.has` without support for deep paths. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @param {Object} [object] The object to query. | ||
12 | - * @param {Array|string} key The key to check. | ||
13 | - * @returns {boolean} Returns `true` if `key` exists, else `false`. | ||
14 | - */ | ||
15 | -function baseHas(object, key) { | ||
16 | - return object != null && hasOwnProperty.call(object, key); | ||
17 | -} | ||
18 | - | ||
19 | -module.exports = baseHas; |
node_modules/lodash/_baseHasIn.js
已删除
100644 → 0
1 | -/** | ||
2 | - * The base implementation of `_.hasIn` without support for deep paths. | ||
3 | - * | ||
4 | - * @private | ||
5 | - * @param {Object} [object] The object to query. | ||
6 | - * @param {Array|string} key The key to check. | ||
7 | - * @returns {boolean} Returns `true` if `key` exists, else `false`. | ||
8 | - */ | ||
9 | -function baseHasIn(object, key) { | ||
10 | - return object != null && key in Object(object); | ||
11 | -} | ||
12 | - | ||
13 | -module.exports = baseHasIn; |
node_modules/lodash/_baseInRange.js
已删除
100644 → 0
1 | -/* Built-in method references for those with the same name as other `lodash` methods. */ | ||
2 | -var nativeMax = Math.max, | ||
3 | - nativeMin = Math.min; | ||
4 | - | ||
5 | -/** | ||
6 | - * The base implementation of `_.inRange` which doesn't coerce arguments. | ||
7 | - * | ||
8 | - * @private | ||
9 | - * @param {number} number The number to check. | ||
10 | - * @param {number} start The start of the range. | ||
11 | - * @param {number} end The end of the range. | ||
12 | - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. | ||
13 | - */ | ||
14 | -function baseInRange(number, start, end) { | ||
15 | - return number >= nativeMin(start, end) && number < nativeMax(start, end); | ||
16 | -} | ||
17 | - | ||
18 | -module.exports = baseInRange; |
node_modules/lodash/_baseIndexOf.js
已删除
100644 → 0
1 | -var baseFindIndex = require('./_baseFindIndex'), | ||
2 | - baseIsNaN = require('./_baseIsNaN'), | ||
3 | - strictIndexOf = require('./_strictIndexOf'); | ||
4 | - | ||
5 | -/** | ||
6 | - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. | ||
7 | - * | ||
8 | - * @private | ||
9 | - * @param {Array} array The array to inspect. | ||
10 | - * @param {*} value The value to search for. | ||
11 | - * @param {number} fromIndex The index to search from. | ||
12 | - * @returns {number} Returns the index of the matched value, else `-1`. | ||
13 | - */ | ||
14 | -function baseIndexOf(array, value, fromIndex) { | ||
15 | - return value === value | ||
16 | - ? strictIndexOf(array, value, fromIndex) | ||
17 | - : baseFindIndex(array, baseIsNaN, fromIndex); | ||
18 | -} | ||
19 | - | ||
20 | -module.exports = baseIndexOf; |
node_modules/lodash/_baseIndexOfWith.js
已删除
100644 → 0
1 | -/** | ||
2 | - * This function is like `baseIndexOf` except that it accepts a comparator. | ||
3 | - * | ||
4 | - * @private | ||
5 | - * @param {Array} array The array to inspect. | ||
6 | - * @param {*} value The value to search for. | ||
7 | - * @param {number} fromIndex The index to search from. | ||
8 | - * @param {Function} comparator The comparator invoked per element. | ||
9 | - * @returns {number} Returns the index of the matched value, else `-1`. | ||
10 | - */ | ||
11 | -function baseIndexOfWith(array, value, fromIndex, comparator) { | ||
12 | - var index = fromIndex - 1, | ||
13 | - length = array.length; | ||
14 | - | ||
15 | - while (++index < length) { | ||
16 | - if (comparator(array[index], value)) { | ||
17 | - return index; | ||
18 | - } | ||
19 | - } | ||
20 | - return -1; | ||
21 | -} | ||
22 | - | ||
23 | -module.exports = baseIndexOfWith; |
node_modules/lodash/_baseIntersection.js
已删除
100644 → 0
1 | -var SetCache = require('./_SetCache'), | ||
2 | - arrayIncludes = require('./_arrayIncludes'), | ||
3 | - arrayIncludesWith = require('./_arrayIncludesWith'), | ||
4 | - arrayMap = require('./_arrayMap'), | ||
5 | - baseUnary = require('./_baseUnary'), | ||
6 | - cacheHas = require('./_cacheHas'); | ||
7 | - | ||
8 | -/* Built-in method references for those with the same name as other `lodash` methods. */ | ||
9 | -var nativeMin = Math.min; | ||
10 | - | ||
11 | -/** | ||
12 | - * The base implementation of methods like `_.intersection`, without support | ||
13 | - * for iteratee shorthands, that accepts an array of arrays to inspect. | ||
14 | - * | ||
15 | - * @private | ||
16 | - * @param {Array} arrays The arrays to inspect. | ||
17 | - * @param {Function} [iteratee] The iteratee invoked per element. | ||
18 | - * @param {Function} [comparator] The comparator invoked per element. | ||
19 | - * @returns {Array} Returns the new array of shared values. | ||
20 | - */ | ||
21 | -function baseIntersection(arrays, iteratee, comparator) { | ||
22 | - var includes = comparator ? arrayIncludesWith : arrayIncludes, | ||
23 | - length = arrays[0].length, | ||
24 | - othLength = arrays.length, | ||
25 | - othIndex = othLength, | ||
26 | - caches = Array(othLength), | ||
27 | - maxLength = Infinity, | ||
28 | - result = []; | ||
29 | - | ||
30 | - while (othIndex--) { | ||
31 | - var array = arrays[othIndex]; | ||
32 | - if (othIndex && iteratee) { | ||
33 | - array = arrayMap(array, baseUnary(iteratee)); | ||
34 | - } | ||
35 | - maxLength = nativeMin(array.length, maxLength); | ||
36 | - caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) | ||
37 | - ? new SetCache(othIndex && array) | ||
38 | - : undefined; | ||
39 | - } | ||
40 | - array = arrays[0]; | ||
41 | - | ||
42 | - var index = -1, | ||
43 | - seen = caches[0]; | ||
44 | - | ||
45 | - outer: | ||
46 | - while (++index < length && result.length < maxLength) { | ||
47 | - var value = array[index], | ||
48 | - computed = iteratee ? iteratee(value) : value; | ||
49 | - | ||
50 | - value = (comparator || value !== 0) ? value : 0; | ||
51 | - if (!(seen | ||
52 | - ? cacheHas(seen, computed) | ||
53 | - : includes(result, computed, comparator) | ||
54 | - )) { | ||
55 | - othIndex = othLength; | ||
56 | - while (--othIndex) { | ||
57 | - var cache = caches[othIndex]; | ||
58 | - if (!(cache | ||
59 | - ? cacheHas(cache, computed) | ||
60 | - : includes(arrays[othIndex], computed, comparator)) | ||
61 | - ) { | ||
62 | - continue outer; | ||
63 | - } | ||
64 | - } | ||
65 | - if (seen) { | ||
66 | - seen.push(computed); | ||
67 | - } | ||
68 | - result.push(value); | ||
69 | - } | ||
70 | - } | ||
71 | - return result; | ||
72 | -} | ||
73 | - | ||
74 | -module.exports = baseIntersection; |
node_modules/lodash/_baseInverter.js
已删除
100644 → 0
1 | -var baseForOwn = require('./_baseForOwn'); | ||
2 | - | ||
3 | -/** | ||
4 | - * The base implementation of `_.invert` and `_.invertBy` which inverts | ||
5 | - * `object` with values transformed by `iteratee` and set by `setter`. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Object} object The object to iterate over. | ||
9 | - * @param {Function} setter The function to set `accumulator` values. | ||
10 | - * @param {Function} iteratee The iteratee to transform values. | ||
11 | - * @param {Object} accumulator The initial inverted object. | ||
12 | - * @returns {Function} Returns `accumulator`. | ||
13 | - */ | ||
14 | -function baseInverter(object, setter, iteratee, accumulator) { | ||
15 | - baseForOwn(object, function(value, key, object) { | ||
16 | - setter(accumulator, iteratee(value), key, object); | ||
17 | - }); | ||
18 | - return accumulator; | ||
19 | -} | ||
20 | - | ||
21 | -module.exports = baseInverter; |
node_modules/lodash/_baseInvoke.js
已删除
100644 → 0
1 | -var apply = require('./_apply'), | ||
2 | - castPath = require('./_castPath'), | ||
3 | - last = require('./last'), | ||
4 | - parent = require('./_parent'), | ||
5 | - toKey = require('./_toKey'); | ||
6 | - | ||
7 | -/** | ||
8 | - * The base implementation of `_.invoke` without support for individual | ||
9 | - * method arguments. | ||
10 | - * | ||
11 | - * @private | ||
12 | - * @param {Object} object The object to query. | ||
13 | - * @param {Array|string} path The path of the method to invoke. | ||
14 | - * @param {Array} args The arguments to invoke the method with. | ||
15 | - * @returns {*} Returns the result of the invoked method. | ||
16 | - */ | ||
17 | -function baseInvoke(object, path, args) { | ||
18 | - path = castPath(path, object); | ||
19 | - object = parent(object, path); | ||
20 | - var func = object == null ? object : object[toKey(last(path))]; | ||
21 | - return func == null ? undefined : apply(func, object, args); | ||
22 | -} | ||
23 | - | ||
24 | -module.exports = baseInvoke; |
node_modules/lodash/_baseIsArguments.js
已删除
100644 → 0
1 | -var baseGetTag = require('./_baseGetTag'), | ||
2 | - isObjectLike = require('./isObjectLike'); | ||
3 | - | ||
4 | -/** `Object#toString` result references. */ | ||
5 | -var argsTag = '[object Arguments]'; | ||
6 | - | ||
7 | -/** | ||
8 | - * The base implementation of `_.isArguments`. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @param {*} value The value to check. | ||
12 | - * @returns {boolean} Returns `true` if `value` is an `arguments` object, | ||
13 | - */ | ||
14 | -function baseIsArguments(value) { | ||
15 | - return isObjectLike(value) && baseGetTag(value) == argsTag; | ||
16 | -} | ||
17 | - | ||
18 | -module.exports = baseIsArguments; |
1 | -var baseGetTag = require('./_baseGetTag'), | ||
2 | - isObjectLike = require('./isObjectLike'); | ||
3 | - | ||
4 | -var arrayBufferTag = '[object ArrayBuffer]'; | ||
5 | - | ||
6 | -/** | ||
7 | - * The base implementation of `_.isArrayBuffer` without Node.js optimizations. | ||
8 | - * | ||
9 | - * @private | ||
10 | - * @param {*} value The value to check. | ||
11 | - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. | ||
12 | - */ | ||
13 | -function baseIsArrayBuffer(value) { | ||
14 | - return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; | ||
15 | -} | ||
16 | - | ||
17 | -module.exports = baseIsArrayBuffer; |
node_modules/lodash/_baseIsDate.js
已删除
100644 → 0
1 | -var baseGetTag = require('./_baseGetTag'), | ||
2 | - isObjectLike = require('./isObjectLike'); | ||
3 | - | ||
4 | -/** `Object#toString` result references. */ | ||
5 | -var dateTag = '[object Date]'; | ||
6 | - | ||
7 | -/** | ||
8 | - * The base implementation of `_.isDate` without Node.js optimizations. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @param {*} value The value to check. | ||
12 | - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. | ||
13 | - */ | ||
14 | -function baseIsDate(value) { | ||
15 | - return isObjectLike(value) && baseGetTag(value) == dateTag; | ||
16 | -} | ||
17 | - | ||
18 | -module.exports = baseIsDate; |
node_modules/lodash/_baseIsEqual.js
已删除
100644 → 0
1 | -var baseIsEqualDeep = require('./_baseIsEqualDeep'), | ||
2 | - isObjectLike = require('./isObjectLike'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.isEqual` which supports partial comparisons | ||
6 | - * and tracks traversed objects. | ||
7 | - * | ||
8 | - * @private | ||
9 | - * @param {*} value The value to compare. | ||
10 | - * @param {*} other The other value to compare. | ||
11 | - * @param {boolean} bitmask The bitmask flags. | ||
12 | - * 1 - Unordered comparison | ||
13 | - * 2 - Partial comparison | ||
14 | - * @param {Function} [customizer] The function to customize comparisons. | ||
15 | - * @param {Object} [stack] Tracks traversed `value` and `other` objects. | ||
16 | - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. | ||
17 | - */ | ||
18 | -function baseIsEqual(value, other, bitmask, customizer, stack) { | ||
19 | - if (value === other) { | ||
20 | - return true; | ||
21 | - } | ||
22 | - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { | ||
23 | - return value !== value && other !== other; | ||
24 | - } | ||
25 | - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); | ||
26 | -} | ||
27 | - | ||
28 | -module.exports = baseIsEqual; |
node_modules/lodash/_baseIsEqualDeep.js
已删除
100644 → 0
1 | -var Stack = require('./_Stack'), | ||
2 | - equalArrays = require('./_equalArrays'), | ||
3 | - equalByTag = require('./_equalByTag'), | ||
4 | - equalObjects = require('./_equalObjects'), | ||
5 | - getTag = require('./_getTag'), | ||
6 | - isArray = require('./isArray'), | ||
7 | - isBuffer = require('./isBuffer'), | ||
8 | - isTypedArray = require('./isTypedArray'); | ||
9 | - | ||
10 | -/** Used to compose bitmasks for value comparisons. */ | ||
11 | -var COMPARE_PARTIAL_FLAG = 1; | ||
12 | - | ||
13 | -/** `Object#toString` result references. */ | ||
14 | -var argsTag = '[object Arguments]', | ||
15 | - arrayTag = '[object Array]', | ||
16 | - objectTag = '[object Object]'; | ||
17 | - | ||
18 | -/** Used for built-in method references. */ | ||
19 | -var objectProto = Object.prototype; | ||
20 | - | ||
21 | -/** Used to check objects for own properties. */ | ||
22 | -var hasOwnProperty = objectProto.hasOwnProperty; | ||
23 | - | ||
24 | -/** | ||
25 | - * A specialized version of `baseIsEqual` for arrays and objects which performs | ||
26 | - * deep comparisons and tracks traversed objects enabling objects with circular | ||
27 | - * references to be compared. | ||
28 | - * | ||
29 | - * @private | ||
30 | - * @param {Object} object The object to compare. | ||
31 | - * @param {Object} other The other object to compare. | ||
32 | - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. | ||
33 | - * @param {Function} customizer The function to customize comparisons. | ||
34 | - * @param {Function} equalFunc The function to determine equivalents of values. | ||
35 | - * @param {Object} [stack] Tracks traversed `object` and `other` objects. | ||
36 | - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. | ||
37 | - */ | ||
38 | -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { | ||
39 | - var objIsArr = isArray(object), | ||
40 | - othIsArr = isArray(other), | ||
41 | - objTag = objIsArr ? arrayTag : getTag(object), | ||
42 | - othTag = othIsArr ? arrayTag : getTag(other); | ||
43 | - | ||
44 | - objTag = objTag == argsTag ? objectTag : objTag; | ||
45 | - othTag = othTag == argsTag ? objectTag : othTag; | ||
46 | - | ||
47 | - var objIsObj = objTag == objectTag, | ||
48 | - othIsObj = othTag == objectTag, | ||
49 | - isSameTag = objTag == othTag; | ||
50 | - | ||
51 | - if (isSameTag && isBuffer(object)) { | ||
52 | - if (!isBuffer(other)) { | ||
53 | - return false; | ||
54 | - } | ||
55 | - objIsArr = true; | ||
56 | - objIsObj = false; | ||
57 | - } | ||
58 | - if (isSameTag && !objIsObj) { | ||
59 | - stack || (stack = new Stack); | ||
60 | - return (objIsArr || isTypedArray(object)) | ||
61 | - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) | ||
62 | - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); | ||
63 | - } | ||
64 | - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { | ||
65 | - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), | ||
66 | - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); | ||
67 | - | ||
68 | - if (objIsWrapped || othIsWrapped) { | ||
69 | - var objUnwrapped = objIsWrapped ? object.value() : object, | ||
70 | - othUnwrapped = othIsWrapped ? other.value() : other; | ||
71 | - | ||
72 | - stack || (stack = new Stack); | ||
73 | - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); | ||
74 | - } | ||
75 | - } | ||
76 | - if (!isSameTag) { | ||
77 | - return false; | ||
78 | - } | ||
79 | - stack || (stack = new Stack); | ||
80 | - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); | ||
81 | -} | ||
82 | - | ||
83 | -module.exports = baseIsEqualDeep; |
node_modules/lodash/_baseIsMap.js
已删除
100644 → 0
1 | -var getTag = require('./_getTag'), | ||
2 | - isObjectLike = require('./isObjectLike'); | ||
3 | - | ||
4 | -/** `Object#toString` result references. */ | ||
5 | -var mapTag = '[object Map]'; | ||
6 | - | ||
7 | -/** | ||
8 | - * The base implementation of `_.isMap` without Node.js optimizations. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @param {*} value The value to check. | ||
12 | - * @returns {boolean} Returns `true` if `value` is a map, else `false`. | ||
13 | - */ | ||
14 | -function baseIsMap(value) { | ||
15 | - return isObjectLike(value) && getTag(value) == mapTag; | ||
16 | -} | ||
17 | - | ||
18 | -module.exports = baseIsMap; |
node_modules/lodash/_baseIsMatch.js
已删除
100644 → 0
1 | -var Stack = require('./_Stack'), | ||
2 | - baseIsEqual = require('./_baseIsEqual'); | ||
3 | - | ||
4 | -/** Used to compose bitmasks for value comparisons. */ | ||
5 | -var COMPARE_PARTIAL_FLAG = 1, | ||
6 | - COMPARE_UNORDERED_FLAG = 2; | ||
7 | - | ||
8 | -/** | ||
9 | - * The base implementation of `_.isMatch` without support for iteratee shorthands. | ||
10 | - * | ||
11 | - * @private | ||
12 | - * @param {Object} object The object to inspect. | ||
13 | - * @param {Object} source The object of property values to match. | ||
14 | - * @param {Array} matchData The property names, values, and compare flags to match. | ||
15 | - * @param {Function} [customizer] The function to customize comparisons. | ||
16 | - * @returns {boolean} Returns `true` if `object` is a match, else `false`. | ||
17 | - */ | ||
18 | -function baseIsMatch(object, source, matchData, customizer) { | ||
19 | - var index = matchData.length, | ||
20 | - length = index, | ||
21 | - noCustomizer = !customizer; | ||
22 | - | ||
23 | - if (object == null) { | ||
24 | - return !length; | ||
25 | - } | ||
26 | - object = Object(object); | ||
27 | - while (index--) { | ||
28 | - var data = matchData[index]; | ||
29 | - if ((noCustomizer && data[2]) | ||
30 | - ? data[1] !== object[data[0]] | ||
31 | - : !(data[0] in object) | ||
32 | - ) { | ||
33 | - return false; | ||
34 | - } | ||
35 | - } | ||
36 | - while (++index < length) { | ||
37 | - data = matchData[index]; | ||
38 | - var key = data[0], | ||
39 | - objValue = object[key], | ||
40 | - srcValue = data[1]; | ||
41 | - | ||
42 | - if (noCustomizer && data[2]) { | ||
43 | - if (objValue === undefined && !(key in object)) { | ||
44 | - return false; | ||
45 | - } | ||
46 | - } else { | ||
47 | - var stack = new Stack; | ||
48 | - if (customizer) { | ||
49 | - var result = customizer(objValue, srcValue, key, object, source, stack); | ||
50 | - } | ||
51 | - if (!(result === undefined | ||
52 | - ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) | ||
53 | - : result | ||
54 | - )) { | ||
55 | - return false; | ||
56 | - } | ||
57 | - } | ||
58 | - } | ||
59 | - return true; | ||
60 | -} | ||
61 | - | ||
62 | -module.exports = baseIsMatch; |
node_modules/lodash/_baseIsNaN.js
已删除
100644 → 0
1 | -/** | ||
2 | - * The base implementation of `_.isNaN` without support for number objects. | ||
3 | - * | ||
4 | - * @private | ||
5 | - * @param {*} value The value to check. | ||
6 | - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. | ||
7 | - */ | ||
8 | -function baseIsNaN(value) { | ||
9 | - return value !== value; | ||
10 | -} | ||
11 | - | ||
12 | -module.exports = baseIsNaN; |
node_modules/lodash/_baseIsNative.js
已删除
100644 → 0
1 | -var isFunction = require('./isFunction'), | ||
2 | - isMasked = require('./_isMasked'), | ||
3 | - isObject = require('./isObject'), | ||
4 | - toSource = require('./_toSource'); | ||
5 | - | ||
6 | -/** | ||
7 | - * Used to match `RegExp` | ||
8 | - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). | ||
9 | - */ | ||
10 | -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; | ||
11 | - | ||
12 | -/** Used to detect host constructors (Safari). */ | ||
13 | -var reIsHostCtor = /^\[object .+?Constructor\]$/; | ||
14 | - | ||
15 | -/** Used for built-in method references. */ | ||
16 | -var funcProto = Function.prototype, | ||
17 | - objectProto = Object.prototype; | ||
18 | - | ||
19 | -/** Used to resolve the decompiled source of functions. */ | ||
20 | -var funcToString = funcProto.toString; | ||
21 | - | ||
22 | -/** Used to check objects for own properties. */ | ||
23 | -var hasOwnProperty = objectProto.hasOwnProperty; | ||
24 | - | ||
25 | -/** Used to detect if a method is native. */ | ||
26 | -var reIsNative = RegExp('^' + | ||
27 | - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') | ||
28 | - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' | ||
29 | -); | ||
30 | - | ||
31 | -/** | ||
32 | - * The base implementation of `_.isNative` without bad shim checks. | ||
33 | - * | ||
34 | - * @private | ||
35 | - * @param {*} value The value to check. | ||
36 | - * @returns {boolean} Returns `true` if `value` is a native function, | ||
37 | - * else `false`. | ||
38 | - */ | ||
39 | -function baseIsNative(value) { | ||
40 | - if (!isObject(value) || isMasked(value)) { | ||
41 | - return false; | ||
42 | - } | ||
43 | - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; | ||
44 | - return pattern.test(toSource(value)); | ||
45 | -} | ||
46 | - | ||
47 | -module.exports = baseIsNative; |
node_modules/lodash/_baseIsRegExp.js
已删除
100644 → 0
1 | -var baseGetTag = require('./_baseGetTag'), | ||
2 | - isObjectLike = require('./isObjectLike'); | ||
3 | - | ||
4 | -/** `Object#toString` result references. */ | ||
5 | -var regexpTag = '[object RegExp]'; | ||
6 | - | ||
7 | -/** | ||
8 | - * The base implementation of `_.isRegExp` without Node.js optimizations. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @param {*} value The value to check. | ||
12 | - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. | ||
13 | - */ | ||
14 | -function baseIsRegExp(value) { | ||
15 | - return isObjectLike(value) && baseGetTag(value) == regexpTag; | ||
16 | -} | ||
17 | - | ||
18 | -module.exports = baseIsRegExp; |
node_modules/lodash/_baseIsSet.js
已删除
100644 → 0
1 | -var getTag = require('./_getTag'), | ||
2 | - isObjectLike = require('./isObjectLike'); | ||
3 | - | ||
4 | -/** `Object#toString` result references. */ | ||
5 | -var setTag = '[object Set]'; | ||
6 | - | ||
7 | -/** | ||
8 | - * The base implementation of `_.isSet` without Node.js optimizations. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @param {*} value The value to check. | ||
12 | - * @returns {boolean} Returns `true` if `value` is a set, else `false`. | ||
13 | - */ | ||
14 | -function baseIsSet(value) { | ||
15 | - return isObjectLike(value) && getTag(value) == setTag; | ||
16 | -} | ||
17 | - | ||
18 | -module.exports = baseIsSet; |
node_modules/lodash/_baseIsTypedArray.js
已删除
100644 → 0
1 | -var baseGetTag = require('./_baseGetTag'), | ||
2 | - isLength = require('./isLength'), | ||
3 | - isObjectLike = require('./isObjectLike'); | ||
4 | - | ||
5 | -/** `Object#toString` result references. */ | ||
6 | -var argsTag = '[object Arguments]', | ||
7 | - arrayTag = '[object Array]', | ||
8 | - boolTag = '[object Boolean]', | ||
9 | - dateTag = '[object Date]', | ||
10 | - errorTag = '[object Error]', | ||
11 | - funcTag = '[object Function]', | ||
12 | - mapTag = '[object Map]', | ||
13 | - numberTag = '[object Number]', | ||
14 | - objectTag = '[object Object]', | ||
15 | - regexpTag = '[object RegExp]', | ||
16 | - setTag = '[object Set]', | ||
17 | - stringTag = '[object String]', | ||
18 | - weakMapTag = '[object WeakMap]'; | ||
19 | - | ||
20 | -var arrayBufferTag = '[object ArrayBuffer]', | ||
21 | - dataViewTag = '[object DataView]', | ||
22 | - float32Tag = '[object Float32Array]', | ||
23 | - float64Tag = '[object Float64Array]', | ||
24 | - int8Tag = '[object Int8Array]', | ||
25 | - int16Tag = '[object Int16Array]', | ||
26 | - int32Tag = '[object Int32Array]', | ||
27 | - uint8Tag = '[object Uint8Array]', | ||
28 | - uint8ClampedTag = '[object Uint8ClampedArray]', | ||
29 | - uint16Tag = '[object Uint16Array]', | ||
30 | - uint32Tag = '[object Uint32Array]'; | ||
31 | - | ||
32 | -/** Used to identify `toStringTag` values of typed arrays. */ | ||
33 | -var typedArrayTags = {}; | ||
34 | -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = | ||
35 | -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = | ||
36 | -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = | ||
37 | -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = | ||
38 | -typedArrayTags[uint32Tag] = true; | ||
39 | -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = | ||
40 | -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = | ||
41 | -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = | ||
42 | -typedArrayTags[errorTag] = typedArrayTags[funcTag] = | ||
43 | -typedArrayTags[mapTag] = typedArrayTags[numberTag] = | ||
44 | -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = | ||
45 | -typedArrayTags[setTag] = typedArrayTags[stringTag] = | ||
46 | -typedArrayTags[weakMapTag] = false; | ||
47 | - | ||
48 | -/** | ||
49 | - * The base implementation of `_.isTypedArray` without Node.js optimizations. | ||
50 | - * | ||
51 | - * @private | ||
52 | - * @param {*} value The value to check. | ||
53 | - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. | ||
54 | - */ | ||
55 | -function baseIsTypedArray(value) { | ||
56 | - return isObjectLike(value) && | ||
57 | - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; | ||
58 | -} | ||
59 | - | ||
60 | -module.exports = baseIsTypedArray; |
node_modules/lodash/_baseIteratee.js
已删除
100644 → 0
1 | -var baseMatches = require('./_baseMatches'), | ||
2 | - baseMatchesProperty = require('./_baseMatchesProperty'), | ||
3 | - identity = require('./identity'), | ||
4 | - isArray = require('./isArray'), | ||
5 | - property = require('./property'); | ||
6 | - | ||
7 | -/** | ||
8 | - * The base implementation of `_.iteratee`. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @param {*} [value=_.identity] The value to convert to an iteratee. | ||
12 | - * @returns {Function} Returns the iteratee. | ||
13 | - */ | ||
14 | -function baseIteratee(value) { | ||
15 | - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. | ||
16 | - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. | ||
17 | - if (typeof value == 'function') { | ||
18 | - return value; | ||
19 | - } | ||
20 | - if (value == null) { | ||
21 | - return identity; | ||
22 | - } | ||
23 | - if (typeof value == 'object') { | ||
24 | - return isArray(value) | ||
25 | - ? baseMatchesProperty(value[0], value[1]) | ||
26 | - : baseMatches(value); | ||
27 | - } | ||
28 | - return property(value); | ||
29 | -} | ||
30 | - | ||
31 | -module.exports = baseIteratee; |
node_modules/lodash/_baseKeys.js
已删除
100644 → 0
1 | -var isPrototype = require('./_isPrototype'), | ||
2 | - nativeKeys = require('./_nativeKeys'); | ||
3 | - | ||
4 | -/** Used for built-in method references. */ | ||
5 | -var objectProto = Object.prototype; | ||
6 | - | ||
7 | -/** Used to check objects for own properties. */ | ||
8 | -var hasOwnProperty = objectProto.hasOwnProperty; | ||
9 | - | ||
10 | -/** | ||
11 | - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. | ||
12 | - * | ||
13 | - * @private | ||
14 | - * @param {Object} object The object to query. | ||
15 | - * @returns {Array} Returns the array of property names. | ||
16 | - */ | ||
17 | -function baseKeys(object) { | ||
18 | - if (!isPrototype(object)) { | ||
19 | - return nativeKeys(object); | ||
20 | - } | ||
21 | - var result = []; | ||
22 | - for (var key in Object(object)) { | ||
23 | - if (hasOwnProperty.call(object, key) && key != 'constructor') { | ||
24 | - result.push(key); | ||
25 | - } | ||
26 | - } | ||
27 | - return result; | ||
28 | -} | ||
29 | - | ||
30 | -module.exports = baseKeys; |
node_modules/lodash/_baseKeysIn.js
已删除
100644 → 0
1 | -var isObject = require('./isObject'), | ||
2 | - isPrototype = require('./_isPrototype'), | ||
3 | - nativeKeysIn = require('./_nativeKeysIn'); | ||
4 | - | ||
5 | -/** Used for built-in method references. */ | ||
6 | -var objectProto = Object.prototype; | ||
7 | - | ||
8 | -/** Used to check objects for own properties. */ | ||
9 | -var hasOwnProperty = objectProto.hasOwnProperty; | ||
10 | - | ||
11 | -/** | ||
12 | - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. | ||
13 | - * | ||
14 | - * @private | ||
15 | - * @param {Object} object The object to query. | ||
16 | - * @returns {Array} Returns the array of property names. | ||
17 | - */ | ||
18 | -function baseKeysIn(object) { | ||
19 | - if (!isObject(object)) { | ||
20 | - return nativeKeysIn(object); | ||
21 | - } | ||
22 | - var isProto = isPrototype(object), | ||
23 | - result = []; | ||
24 | - | ||
25 | - for (var key in object) { | ||
26 | - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { | ||
27 | - result.push(key); | ||
28 | - } | ||
29 | - } | ||
30 | - return result; | ||
31 | -} | ||
32 | - | ||
33 | -module.exports = baseKeysIn; |
node_modules/lodash/_baseLodash.js
已删除
100644 → 0
node_modules/lodash/_baseLt.js
已删除
100644 → 0
1 | -/** | ||
2 | - * The base implementation of `_.lt` which doesn't coerce arguments. | ||
3 | - * | ||
4 | - * @private | ||
5 | - * @param {*} value The value to compare. | ||
6 | - * @param {*} other The other value to compare. | ||
7 | - * @returns {boolean} Returns `true` if `value` is less than `other`, | ||
8 | - * else `false`. | ||
9 | - */ | ||
10 | -function baseLt(value, other) { | ||
11 | - return value < other; | ||
12 | -} | ||
13 | - | ||
14 | -module.exports = baseLt; |
node_modules/lodash/_baseMap.js
已删除
100644 → 0
1 | -var baseEach = require('./_baseEach'), | ||
2 | - isArrayLike = require('./isArrayLike'); | ||
3 | - | ||
4 | -/** | ||
5 | - * The base implementation of `_.map` without support for iteratee shorthands. | ||
6 | - * | ||
7 | - * @private | ||
8 | - * @param {Array|Object} collection The collection to iterate over. | ||
9 | - * @param {Function} iteratee The function invoked per iteration. | ||
10 | - * @returns {Array} Returns the new mapped array. | ||
11 | - */ | ||
12 | -function baseMap(collection, iteratee) { | ||
13 | - var index = -1, | ||
14 | - result = isArrayLike(collection) ? Array(collection.length) : []; | ||
15 | - | ||
16 | - baseEach(collection, function(value, key, collection) { | ||
17 | - result[++index] = iteratee(value, key, collection); | ||
18 | - }); | ||
19 | - return result; | ||
20 | -} | ||
21 | - | ||
22 | -module.exports = baseMap; |
node_modules/lodash/_baseMatches.js
已删除
100644 → 0
1 | -var baseIsMatch = require('./_baseIsMatch'), | ||
2 | - getMatchData = require('./_getMatchData'), | ||
3 | - matchesStrictComparable = require('./_matchesStrictComparable'); | ||
4 | - | ||
5 | -/** | ||
6 | - * The base implementation of `_.matches` which doesn't clone `source`. | ||
7 | - * | ||
8 | - * @private | ||
9 | - * @param {Object} source The object of property values to match. | ||
10 | - * @returns {Function} Returns the new spec function. | ||
11 | - */ | ||
12 | -function baseMatches(source) { | ||
13 | - var matchData = getMatchData(source); | ||
14 | - if (matchData.length == 1 && matchData[0][2]) { | ||
15 | - return matchesStrictComparable(matchData[0][0], matchData[0][1]); | ||
16 | - } | ||
17 | - return function(object) { | ||
18 | - return object === source || baseIsMatch(object, source, matchData); | ||
19 | - }; | ||
20 | -} | ||
21 | - | ||
22 | -module.exports = baseMatches; |
1 | -var baseIsEqual = require('./_baseIsEqual'), | ||
2 | - get = require('./get'), | ||
3 | - hasIn = require('./hasIn'), | ||
4 | - isKey = require('./_isKey'), | ||
5 | - isStrictComparable = require('./_isStrictComparable'), | ||
6 | - matchesStrictComparable = require('./_matchesStrictComparable'), | ||
7 | - toKey = require('./_toKey'); | ||
8 | - | ||
9 | -/** Used to compose bitmasks for value comparisons. */ | ||
10 | -var COMPARE_PARTIAL_FLAG = 1, | ||
11 | - COMPARE_UNORDERED_FLAG = 2; | ||
12 | - | ||
13 | -/** | ||
14 | - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. | ||
15 | - * | ||
16 | - * @private | ||
17 | - * @param {string} path The path of the property to get. | ||
18 | - * @param {*} srcValue The value to match. | ||
19 | - * @returns {Function} Returns the new spec function. | ||
20 | - */ | ||
21 | -function baseMatchesProperty(path, srcValue) { | ||
22 | - if (isKey(path) && isStrictComparable(srcValue)) { | ||
23 | - return matchesStrictComparable(toKey(path), srcValue); | ||
24 | - } | ||
25 | - return function(object) { | ||
26 | - var objValue = get(object, path); | ||
27 | - return (objValue === undefined && objValue === srcValue) | ||
28 | - ? hasIn(object, path) | ||
29 | - : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); | ||
30 | - }; | ||
31 | -} | ||
32 | - | ||
33 | -module.exports = baseMatchesProperty; |
node_modules/lodash/_baseMean.js
已删除
100644 → 0
1 | -var baseSum = require('./_baseSum'); | ||
2 | - | ||
3 | -/** Used as references for various `Number` constants. */ | ||
4 | -var NAN = 0 / 0; | ||
5 | - | ||
6 | -/** | ||
7 | - * The base implementation of `_.mean` and `_.meanBy` without support for | ||
8 | - * iteratee shorthands. | ||
9 | - * | ||
10 | - * @private | ||
11 | - * @param {Array} array The array to iterate over. | ||
12 | - * @param {Function} iteratee The function invoked per iteration. | ||
13 | - * @returns {number} Returns the mean. | ||
14 | - */ | ||
15 | -function baseMean(array, iteratee) { | ||
16 | - var length = array == null ? 0 : array.length; | ||
17 | - return length ? (baseSum(array, iteratee) / length) : NAN; | ||
18 | -} | ||
19 | - | ||
20 | -module.exports = baseMean; |
node_modules/lodash/_baseMerge.js
已删除
100644 → 0
1 | -var Stack = require('./_Stack'), | ||
2 | - assignMergeValue = require('./_assignMergeValue'), | ||
3 | - baseFor = require('./_baseFor'), | ||
4 | - baseMergeDeep = require('./_baseMergeDeep'), | ||
5 | - isObject = require('./isObject'), | ||
6 | - keysIn = require('./keysIn'), | ||
7 | - safeGet = require('./_safeGet'); | ||
8 | - | ||
9 | -/** | ||
10 | - * The base implementation of `_.merge` without support for multiple sources. | ||
11 | - * | ||
12 | - * @private | ||
13 | - * @param {Object} object The destination object. | ||
14 | - * @param {Object} source The source object. | ||
15 | - * @param {number} srcIndex The index of `source`. | ||
16 | - * @param {Function} [customizer] The function to customize merged values. | ||
17 | - * @param {Object} [stack] Tracks traversed source values and their merged | ||
18 | - * counterparts. | ||
19 | - */ | ||
20 | -function baseMerge(object, source, srcIndex, customizer, stack) { | ||
21 | - if (object === source) { | ||
22 | - return; | ||
23 | - } | ||
24 | - baseFor(source, function(srcValue, key) { | ||
25 | - stack || (stack = new Stack); | ||
26 | - if (isObject(srcValue)) { | ||
27 | - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); | ||
28 | - } | ||
29 | - else { | ||
30 | - var newValue = customizer | ||
31 | - ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) | ||
32 | - : undefined; | ||
33 | - | ||
34 | - if (newValue === undefined) { | ||
35 | - newValue = srcValue; | ||
36 | - } | ||
37 | - assignMergeValue(object, key, newValue); | ||
38 | - } | ||
39 | - }, keysIn); | ||
40 | -} | ||
41 | - | ||
42 | -module.exports = baseMerge; |
node_modules/lodash/_baseMergeDeep.js
已删除
100644 → 0
1 | -var assignMergeValue = require('./_assignMergeValue'), | ||
2 | - cloneBuffer = require('./_cloneBuffer'), | ||
3 | - cloneTypedArray = require('./_cloneTypedArray'), | ||
4 | - copyArray = require('./_copyArray'), | ||
5 | - initCloneObject = require('./_initCloneObject'), | ||
6 | - isArguments = require('./isArguments'), | ||
7 | - isArray = require('./isArray'), | ||
8 | - isArrayLikeObject = require('./isArrayLikeObject'), | ||
9 | - isBuffer = require('./isBuffer'), | ||
10 | - isFunction = require('./isFunction'), | ||
11 | - isObject = require('./isObject'), | ||
12 | - isPlainObject = require('./isPlainObject'), | ||
13 | - isTypedArray = require('./isTypedArray'), | ||
14 | - safeGet = require('./_safeGet'), | ||
15 | - toPlainObject = require('./toPlainObject'); | ||
16 | - | ||
17 | -/** | ||
18 | - * A specialized version of `baseMerge` for arrays and objects which performs | ||
19 | - * deep merges and tracks traversed objects enabling objects with circular | ||
20 | - * references to be merged. | ||
21 | - * | ||
22 | - * @private | ||
23 | - * @param {Object} object The destination object. | ||
24 | - * @param {Object} source The source object. | ||
25 | - * @param {string} key The key of the value to merge. | ||
26 | - * @param {number} srcIndex The index of `source`. | ||
27 | - * @param {Function} mergeFunc The function to merge values. | ||
28 | - * @param {Function} [customizer] The function to customize assigned values. | ||
29 | - * @param {Object} [stack] Tracks traversed source values and their merged | ||
30 | - * counterparts. | ||
31 | - */ | ||
32 | -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { | ||
33 | - var objValue = safeGet(object, key), | ||
34 | - srcValue = safeGet(source, key), | ||
35 | - stacked = stack.get(srcValue); | ||
36 | - | ||
37 | - if (stacked) { | ||
38 | - assignMergeValue(object, key, stacked); | ||
39 | - return; | ||
40 | - } | ||
41 | - var newValue = customizer | ||
42 | - ? customizer(objValue, srcValue, (key + ''), object, source, stack) | ||
43 | - : undefined; | ||
44 | - | ||
45 | - var isCommon = newValue === undefined; | ||
46 | - | ||
47 | - if (isCommon) { | ||
48 | - var isArr = isArray(srcValue), | ||
49 | - isBuff = !isArr && isBuffer(srcValue), | ||
50 | - isTyped = !isArr && !isBuff && isTypedArray(srcValue); | ||
51 | - | ||
52 | - newValue = srcValue; | ||
53 | - if (isArr || isBuff || isTyped) { | ||
54 | - if (isArray(objValue)) { | ||
55 | - newValue = objValue; | ||
56 | - } | ||
57 | - else if (isArrayLikeObject(objValue)) { | ||
58 | - newValue = copyArray(objValue); | ||
59 | - } | ||
60 | - else if (isBuff) { | ||
61 | - isCommon = false; | ||
62 | - newValue = cloneBuffer(srcValue, true); | ||
63 | - } | ||
64 | - else if (isTyped) { | ||
65 | - isCommon = false; | ||
66 | - newValue = cloneTypedArray(srcValue, true); | ||
67 | - } | ||
68 | - else { | ||
69 | - newValue = []; | ||
70 | - } | ||
71 | - } | ||
72 | - else if (isPlainObject(srcValue) || isArguments(srcValue)) { | ||
73 | - newValue = objValue; | ||
74 | - if (isArguments(objValue)) { | ||
75 | - newValue = toPlainObject(objValue); | ||
76 | - } | ||
77 | - else if (!isObject(objValue) || isFunction(objValue)) { | ||
78 | - newValue = initCloneObject(srcValue); | ||
79 | - } | ||
80 | - } | ||
81 | - else { | ||
82 | - isCommon = false; | ||
83 | - } | ||
84 | - } | ||
85 | - if (isCommon) { | ||
86 | - // Recursively merge objects and arrays (susceptible to call stack limits). | ||
87 | - stack.set(srcValue, newValue); | ||
88 | - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); | ||
89 | - stack['delete'](srcValue); | ||
90 | - } | ||
91 | - assignMergeValue(object, key, newValue); | ||
92 | -} | ||
93 | - | ||
94 | -module.exports = baseMergeDeep; |
请
注册
或
登录
后发表评论