mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24a4285b70 | ||
|
|
bbd78fee4d |
26
README.md
26
README.md
@@ -1,13 +1,7 @@
|
||||
# lodash v4.0.1
|
||||
# lodash v4.2.0
|
||||
|
||||
The [lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
|
||||
|
||||
Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
|
||||
```bash
|
||||
$ lodash modularize exports=node -o ./
|
||||
$ lodash -d -o ./lodash.js
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
@@ -22,15 +16,19 @@ In Node.js:
|
||||
var _ = require('lodash');
|
||||
// load the core build
|
||||
var _ = require('lodash/core');
|
||||
// load the fp build
|
||||
// load the fp build for immutable auto-curried iteratee-first data-last methods
|
||||
var _ = require('lodash/fp');
|
||||
|
||||
// or a method category
|
||||
var array = require('lodash/array');
|
||||
// or a method (great for smaller builds with browserify/webpack)
|
||||
var object = require('lodash/fp/object');
|
||||
|
||||
// or method for smaller builds with browserify/rollup/webpack
|
||||
var chunk = require('lodash/chunk');
|
||||
var extend = require('lodash/fp/extend');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/tree/4.0.1-npm) for more details.
|
||||
See the [package source](https://github.com/lodash/lodash/tree/4.2.0-npm) for more details.
|
||||
|
||||
**Note:**<br>
|
||||
Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.<br>
|
||||
@@ -38,11 +36,11 @@ Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash b
|
||||
|
||||
## Module formats
|
||||
|
||||
Lodash is also available in a variety of other builds & module formats.
|
||||
Lodash is available in a variety of other builds & module formats.
|
||||
|
||||
* [lodash](https://www.npmjs.com/package/lodash) & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) packages
|
||||
* [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/browse/keyword/lodash-modularized)
|
||||
* [lodash-amd](https://www.npmjs.com/package/lodash-amd)
|
||||
* [lodash-es](https://www.npmjs.com/package/lodash-es)
|
||||
* [lodash-es](https://www.npmjs.com/package/lodash-es) & [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash)
|
||||
|
||||
## Further Reading
|
||||
|
||||
@@ -54,5 +52,5 @@ Lodash is also available in a variety of other builds & module formats.
|
||||
|
||||
## Support
|
||||
|
||||
Tested in Chrome 46-47, Firefox 42-43, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10.x, 0.12.x, 4.x, & 5.x, & PhantomJS 1.9.8.
|
||||
Tested in Chrome 47-48, Firefox 43-44, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10, 0.12, 4, & 5, & PhantomJS 1.9.8.
|
||||
Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
var nativeCreate = require('./nativeCreate');
|
||||
var nativeCreate = require('./_nativeCreate');
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = global.Object.prototype;
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Creates an hash object.
|
||||
@@ -1,5 +1,5 @@
|
||||
var baseCreate = require('./baseCreate'),
|
||||
baseLodash = require('./baseLodash');
|
||||
var baseCreate = require('./_baseCreate'),
|
||||
baseLodash = require('./_baseLodash');
|
||||
|
||||
/** Used as references for the maximum length and index of an array. */
|
||||
var MAX_ARRAY_LENGTH = 4294967295;
|
||||
@@ -1,5 +1,5 @@
|
||||
var baseCreate = require('./baseCreate'),
|
||||
baseLodash = require('./baseLodash');
|
||||
var baseCreate = require('./_baseCreate'),
|
||||
baseLodash = require('./_baseLodash');
|
||||
|
||||
/**
|
||||
* The base constructor for creating `lodash` wrapper objects.
|
||||
7
_Map.js
Normal file
7
_Map.js
Normal file
@@ -0,0 +1,7 @@
|
||||
var getNative = require('./_getNative'),
|
||||
root = require('./_root');
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var Map = getNative(root, 'Map');
|
||||
|
||||
module.exports = Map;
|
||||
@@ -1,8 +1,8 @@
|
||||
var mapClear = require('./mapClear'),
|
||||
mapDelete = require('./mapDelete'),
|
||||
mapGet = require('./mapGet'),
|
||||
mapHas = require('./mapHas'),
|
||||
mapSet = require('./mapSet');
|
||||
var mapClear = require('./_mapClear'),
|
||||
mapDelete = require('./_mapDelete'),
|
||||
mapGet = require('./_mapGet'),
|
||||
mapHas = require('./_mapHas'),
|
||||
mapSet = require('./_mapSet');
|
||||
|
||||
/**
|
||||
* Creates a map cache object to store key-value pairs.
|
||||
@@ -1,4 +1,6 @@
|
||||
var root = require('./_root');
|
||||
|
||||
/** Built-in value references. */
|
||||
var Reflect = global.Reflect;
|
||||
var Reflect = root.Reflect;
|
||||
|
||||
module.exports = Reflect;
|
||||
7
_Set.js
Normal file
7
_Set.js
Normal file
@@ -0,0 +1,7 @@
|
||||
var getNative = require('./_getNative'),
|
||||
root = require('./_root');
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var Set = getNative(root, 'Set');
|
||||
|
||||
module.exports = Set;
|
||||
@@ -1,5 +1,5 @@
|
||||
var MapCache = require('./MapCache'),
|
||||
cachePush = require('./cachePush');
|
||||
var MapCache = require('./_MapCache'),
|
||||
cachePush = require('./_cachePush');
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -1,8 +1,8 @@
|
||||
var stackClear = require('./stackClear'),
|
||||
stackDelete = require('./stackDelete'),
|
||||
stackGet = require('./stackGet'),
|
||||
stackHas = require('./stackHas'),
|
||||
stackSet = require('./stackSet');
|
||||
var stackClear = require('./_stackClear'),
|
||||
stackDelete = require('./_stackDelete'),
|
||||
stackGet = require('./_stackGet'),
|
||||
stackHas = require('./_stackHas'),
|
||||
stackSet = require('./_stackSet');
|
||||
|
||||
/**
|
||||
* Creates a stack cache object to store key-value pairs.
|
||||
@@ -1,4 +1,6 @@
|
||||
var root = require('./_root');
|
||||
|
||||
/** Built-in value references. */
|
||||
var Symbol = global.Symbol;
|
||||
var Symbol = root.Symbol;
|
||||
|
||||
module.exports = Symbol;
|
||||
6
_Uint8Array.js
Normal file
6
_Uint8Array.js
Normal file
@@ -0,0 +1,6 @@
|
||||
var root = require('./_root');
|
||||
|
||||
/** Built-in value references. */
|
||||
var Uint8Array = root.Uint8Array;
|
||||
|
||||
module.exports = Uint8Array;
|
||||
7
_WeakMap.js
Normal file
7
_WeakMap.js
Normal file
@@ -0,0 +1,7 @@
|
||||
var getNative = require('./_getNative'),
|
||||
root = require('./_root');
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var WeakMap = getNative(root, 'WeakMap');
|
||||
|
||||
module.exports = WeakMap;
|
||||
@@ -5,11 +5,11 @@
|
||||
* @private
|
||||
* @param {Function} func The function to invoke.
|
||||
* @param {*} thisArg The `this` binding of `func`.
|
||||
* @param {...*} [args] The arguments to invoke `func` with.
|
||||
* @param {...*} args The arguments to invoke `func` with.
|
||||
* @returns {*} Returns the result of `func`.
|
||||
*/
|
||||
function apply(func, thisArg, args) {
|
||||
var length = args ? args.length : 0;
|
||||
var length = args.length;
|
||||
switch (length) {
|
||||
case 0: return func.call(thisArg);
|
||||
case 1: return func.call(thisArg, args[0]);
|
||||
22
_arrayAggregator.js
Normal file
22
_arrayAggregator.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* A specialized version of `baseAggregator` for arrays.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} setter The function to set `accumulator` values.
|
||||
* @param {Function} iteratee The iteratee to transform keys.
|
||||
* @param {Object} accumulator The initial aggregated object.
|
||||
* @returns {Function} Returns `accumulator`.
|
||||
*/
|
||||
function arrayAggregator(array, setter, iteratee, accumulator) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
setter(accumulator, value, iteratee(value), array);
|
||||
}
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
module.exports = arrayAggregator;
|
||||
@@ -1,4 +1,4 @@
|
||||
var baseIndexOf = require('./baseIndexOf');
|
||||
var baseIndexOf = require('./_baseIndexOf');
|
||||
|
||||
/**
|
||||
* A specialized version of `_.includes` for arrays without support for
|
||||
@@ -1,7 +1,7 @@
|
||||
var eq = require('../eq');
|
||||
var eq = require('./eq');
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = global.Object.prototype;
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
@@ -1,4 +1,4 @@
|
||||
var eq = require('../eq');
|
||||
var eq = require('./eq');
|
||||
|
||||
/**
|
||||
* This function is like `assignValue` except that it doesn't assign `undefined` values.
|
||||
@@ -1,7 +1,7 @@
|
||||
var eq = require('../eq');
|
||||
var eq = require('./eq');
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = global.Object.prototype;
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
@@ -1,7 +1,7 @@
|
||||
var assocIndexOf = require('./assocIndexOf');
|
||||
var assocIndexOf = require('./_assocIndexOf');
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = global.Array.prototype;
|
||||
var arrayProto = Array.prototype;
|
||||
|
||||
/** Built-in value references. */
|
||||
var splice = arrayProto.splice;
|
||||
@@ -1,4 +1,4 @@
|
||||
var assocIndexOf = require('./assocIndexOf');
|
||||
var assocIndexOf = require('./_assocIndexOf');
|
||||
|
||||
/**
|
||||
* Gets the associative array value for `key`.
|
||||
@@ -1,4 +1,4 @@
|
||||
var assocIndexOf = require('./assocIndexOf');
|
||||
var assocIndexOf = require('./_assocIndexOf');
|
||||
|
||||
/**
|
||||
* Checks if an associative array value for `key` exists.
|
||||
@@ -1,4 +1,4 @@
|
||||
var eq = require('../eq');
|
||||
var eq = require('./eq');
|
||||
|
||||
/**
|
||||
* Gets the index at which the first occurrence of `key` is found in `array`
|
||||
@@ -1,4 +1,4 @@
|
||||
var assocIndexOf = require('./assocIndexOf');
|
||||
var assocIndexOf = require('./_assocIndexOf');
|
||||
|
||||
/**
|
||||
* Sets the associative array `key` to `value`.
|
||||
21
_baseAggregator.js
Normal file
21
_baseAggregator.js
Normal file
@@ -0,0 +1,21 @@
|
||||
var baseEach = require('./_baseEach');
|
||||
|
||||
/**
|
||||
* Aggregates elements of `collection` on `accumulator` with keys transformed
|
||||
* by `iteratee` and values set by `setter`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function} setter The function to set `accumulator` values.
|
||||
* @param {Function} iteratee The iteratee to transform keys.
|
||||
* @param {Object} accumulator The initial aggregated object.
|
||||
* @returns {Function} Returns `accumulator`.
|
||||
*/
|
||||
function baseAggregator(collection, setter, iteratee, accumulator) {
|
||||
baseEach(collection, function(value, key, collection) {
|
||||
setter(accumulator, value, iteratee(value), collection);
|
||||
});
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
module.exports = baseAggregator;
|
||||
@@ -1,5 +1,5 @@
|
||||
var copyObject = require('./copyObject'),
|
||||
keys = require('../keys');
|
||||
var copyObject = require('./_copyObject'),
|
||||
keys = require('./keys');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.assign` without support for multiple sources
|
||||
@@ -1,4 +1,4 @@
|
||||
var get = require('../get');
|
||||
var get = require('./get');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.at` without support for individual paths.
|
||||
@@ -1,17 +1,17 @@
|
||||
var Stack = require('./Stack'),
|
||||
arrayEach = require('./arrayEach'),
|
||||
assignValue = require('./assignValue'),
|
||||
baseAssign = require('./baseAssign'),
|
||||
baseForOwn = require('./baseForOwn'),
|
||||
copyArray = require('./copyArray'),
|
||||
copySymbols = require('./copySymbols'),
|
||||
getTag = require('./getTag'),
|
||||
initCloneArray = require('./initCloneArray'),
|
||||
initCloneByTag = require('./initCloneByTag'),
|
||||
initCloneObject = require('./initCloneObject'),
|
||||
isArray = require('../isArray'),
|
||||
isHostObject = require('./isHostObject'),
|
||||
isObject = require('../isObject');
|
||||
var Stack = require('./_Stack'),
|
||||
arrayEach = require('./_arrayEach'),
|
||||
assignValue = require('./_assignValue'),
|
||||
baseAssign = require('./_baseAssign'),
|
||||
baseForOwn = require('./_baseForOwn'),
|
||||
copyArray = require('./_copyArray'),
|
||||
copySymbols = require('./_copySymbols'),
|
||||
getTag = require('./_getTag'),
|
||||
initCloneArray = require('./_initCloneArray'),
|
||||
initCloneByTag = require('./_initCloneByTag'),
|
||||
initCloneObject = require('./_initCloneObject'),
|
||||
isArray = require('./isArray'),
|
||||
isHostObject = require('./_isHostObject'),
|
||||
isObject = require('./isObject');
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var argsTag = '[object Arguments]',
|
||||
@@ -1,4 +1,4 @@
|
||||
var keys = require('../keys');
|
||||
var keys = require('./keys');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.conforms` which doesn't clone `source`.
|
||||
@@ -1,4 +1,4 @@
|
||||
var isObject = require('../isObject');
|
||||
var isObject = require('./isObject');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.create` without support for assigning
|
||||
@@ -1,9 +1,9 @@
|
||||
var SetCache = require('./SetCache'),
|
||||
arrayIncludes = require('./arrayIncludes'),
|
||||
arrayIncludesWith = require('./arrayIncludesWith'),
|
||||
arrayMap = require('./arrayMap'),
|
||||
baseUnary = require('./baseUnary'),
|
||||
cacheHas = require('./cacheHas');
|
||||
var SetCache = require('./_SetCache'),
|
||||
arrayIncludes = require('./_arrayIncludes'),
|
||||
arrayIncludesWith = require('./_arrayIncludesWith'),
|
||||
arrayMap = require('./_arrayMap'),
|
||||
baseUnary = require('./_baseUnary'),
|
||||
cacheHas = require('./_cacheHas');
|
||||
|
||||
/** Used as the size to enable large array optimizations. */
|
||||
var LARGE_ARRAY_SIZE = 200;
|
||||
@@ -1,5 +1,5 @@
|
||||
var baseForOwn = require('./baseForOwn'),
|
||||
createBaseEach = require('./createBaseEach');
|
||||
var baseForOwn = require('./_baseForOwn'),
|
||||
createBaseEach = require('./_createBaseEach');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forEach` without support for iteratee shorthands.
|
||||
@@ -1,5 +1,5 @@
|
||||
var baseForOwnRight = require('./baseForOwnRight'),
|
||||
createBaseEach = require('./createBaseEach');
|
||||
var baseForOwnRight = require('./_baseForOwnRight'),
|
||||
createBaseEach = require('./_createBaseEach');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forEachRight` without support for iteratee shorthands.
|
||||
@@ -1,4 +1,4 @@
|
||||
var baseEach = require('./baseEach');
|
||||
var baseEach = require('./_baseEach');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.every` without support for iteratee shorthands.
|
||||
@@ -1,5 +1,5 @@
|
||||
var toInteger = require('../toInteger'),
|
||||
toLength = require('../toLength');
|
||||
var toInteger = require('./toInteger'),
|
||||
toLength = require('./toLength');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.fill` without an iteratee call guard.
|
||||
@@ -1,4 +1,4 @@
|
||||
var baseEach = require('./baseEach');
|
||||
var baseEach = require('./_baseEach');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.filter` without support for iteratee shorthands.
|
||||
@@ -1,7 +1,7 @@
|
||||
var arrayPush = require('./arrayPush'),
|
||||
isArguments = require('../isArguments'),
|
||||
isArray = require('../isArray'),
|
||||
isArrayLikeObject = require('../isArrayLikeObject');
|
||||
var arrayPush = require('./_arrayPush'),
|
||||
isArguments = require('./isArguments'),
|
||||
isArray = require('./isArray'),
|
||||
isArrayLikeObject = require('./isArrayLikeObject');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.flatten` with support for restricting flattening.
|
||||
@@ -1,4 +1,4 @@
|
||||
var createBaseFor = require('./createBaseFor');
|
||||
var createBaseFor = require('./_createBaseFor');
|
||||
|
||||
/**
|
||||
* The base implementation of `baseForIn` and `baseForOwn` which iterates
|
||||
@@ -1,5 +1,5 @@
|
||||
var baseFor = require('./baseFor'),
|
||||
keysIn = require('../keysIn');
|
||||
var baseFor = require('./_baseFor'),
|
||||
keysIn = require('./keysIn');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forIn` without support for iteratee shorthands.
|
||||
@@ -1,5 +1,5 @@
|
||||
var baseFor = require('./baseFor'),
|
||||
keys = require('../keys');
|
||||
var baseFor = require('./_baseFor'),
|
||||
keys = require('./keys');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
||||
@@ -1,5 +1,5 @@
|
||||
var baseForRight = require('./baseForRight'),
|
||||
keys = require('../keys');
|
||||
var baseForRight = require('./_baseForRight'),
|
||||
keys = require('./keys');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forOwnRight` without support for iteratee shorthands.
|
||||
@@ -1,4 +1,4 @@
|
||||
var createBaseFor = require('./createBaseFor');
|
||||
var createBaseFor = require('./_createBaseFor');
|
||||
|
||||
/**
|
||||
* This function is like `baseFor` except that it iterates over properties
|
||||
@@ -1,5 +1,5 @@
|
||||
var arrayFilter = require('./arrayFilter'),
|
||||
isFunction = require('../isFunction');
|
||||
var arrayFilter = require('./_arrayFilter'),
|
||||
isFunction = require('./isFunction');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.functions` which creates an array of
|
||||
@@ -1,5 +1,5 @@
|
||||
var baseToPath = require('./baseToPath'),
|
||||
isKey = require('./isKey');
|
||||
var baseToPath = require('./_baseToPath'),
|
||||
isKey = require('./_isKey');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.get` without support for default values.
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = global.Object.prototype;
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
@@ -1,4 +1,4 @@
|
||||
var indexOfNaN = require('./indexOfNaN');
|
||||
var indexOfNaN = require('./_indexOfNaN');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
||||
@@ -1,9 +1,9 @@
|
||||
var SetCache = require('./SetCache'),
|
||||
arrayIncludes = require('./arrayIncludes'),
|
||||
arrayIncludesWith = require('./arrayIncludesWith'),
|
||||
arrayMap = require('./arrayMap'),
|
||||
baseUnary = require('./baseUnary'),
|
||||
cacheHas = require('./cacheHas');
|
||||
var SetCache = require('./_SetCache'),
|
||||
arrayIncludes = require('./_arrayIncludes'),
|
||||
arrayIncludesWith = require('./_arrayIncludesWith'),
|
||||
arrayMap = require('./_arrayMap'),
|
||||
baseUnary = require('./_baseUnary'),
|
||||
cacheHas = require('./_cacheHas');
|
||||
|
||||
/**
|
||||
* The base implementation of methods like `_.intersection`, without support
|
||||
21
_baseInverter.js
Normal file
21
_baseInverter.js
Normal file
@@ -0,0 +1,21 @@
|
||||
var baseForOwn = require('./_baseForOwn');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.invert` and `_.invertBy` which inverts
|
||||
* `object` with values transformed by `iteratee` and set by `setter`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} setter The function to set `accumulator` values.
|
||||
* @param {Function} iteratee The iteratee to transform values.
|
||||
* @param {Object} accumulator The initial inverted object.
|
||||
* @returns {Function} Returns `accumulator`.
|
||||
*/
|
||||
function baseInverter(object, setter, iteratee, accumulator) {
|
||||
baseForOwn(object, function(value, key, object) {
|
||||
setter(accumulator, iteratee(value), key, object);
|
||||
});
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
module.exports = baseInverter;
|
||||
@@ -1,8 +1,8 @@
|
||||
var apply = require('./apply'),
|
||||
baseToPath = require('./baseToPath'),
|
||||
isKey = require('./isKey'),
|
||||
last = require('../last'),
|
||||
parent = require('./parent');
|
||||
var apply = require('./_apply'),
|
||||
baseToPath = require('./_baseToPath'),
|
||||
isKey = require('./_isKey'),
|
||||
last = require('./last'),
|
||||
parent = require('./_parent');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.invoke` without support for individual
|
||||
@@ -1,6 +1,6 @@
|
||||
var baseIsEqualDeep = require('./baseIsEqualDeep'),
|
||||
isObject = require('../isObject'),
|
||||
isObjectLike = require('../isObjectLike');
|
||||
var baseIsEqualDeep = require('./_baseIsEqualDeep'),
|
||||
isObject = require('./isObject'),
|
||||
isObjectLike = require('./isObjectLike');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.isEqual` which supports partial comparisons
|
||||
@@ -1,11 +1,11 @@
|
||||
var Stack = require('./Stack'),
|
||||
equalArrays = require('./equalArrays'),
|
||||
equalByTag = require('./equalByTag'),
|
||||
equalObjects = require('./equalObjects'),
|
||||
getTag = require('./getTag'),
|
||||
isArray = require('../isArray'),
|
||||
isHostObject = require('./isHostObject'),
|
||||
isTypedArray = require('../isTypedArray');
|
||||
var Stack = require('./_Stack'),
|
||||
equalArrays = require('./_equalArrays'),
|
||||
equalByTag = require('./_equalByTag'),
|
||||
equalObjects = require('./_equalObjects'),
|
||||
getTag = require('./_getTag'),
|
||||
isArray = require('./isArray'),
|
||||
isHostObject = require('./_isHostObject'),
|
||||
isTypedArray = require('./isTypedArray');
|
||||
|
||||
/** Used to compose bitmasks for comparison styles. */
|
||||
var PARTIAL_COMPARE_FLAG = 2;
|
||||
@@ -16,7 +16,7 @@ var argsTag = '[object Arguments]',
|
||||
objectTag = '[object Object]';
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = global.Object.prototype;
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
@@ -1,5 +1,5 @@
|
||||
var Stack = require('./Stack'),
|
||||
baseIsEqual = require('./baseIsEqual');
|
||||
var Stack = require('./_Stack'),
|
||||
baseIsEqual = require('./_baseIsEqual');
|
||||
|
||||
/** Used to compose bitmasks for comparison styles. */
|
||||
var UNORDERED_COMPARE_FLAG = 1,
|
||||
@@ -1,8 +1,8 @@
|
||||
var baseMatches = require('./baseMatches'),
|
||||
baseMatchesProperty = require('./baseMatchesProperty'),
|
||||
identity = require('../identity'),
|
||||
isArray = require('../isArray'),
|
||||
property = require('../property');
|
||||
var baseMatches = require('./_baseMatches'),
|
||||
baseMatchesProperty = require('./_baseMatchesProperty'),
|
||||
identity = require('./identity'),
|
||||
isArray = require('./isArray'),
|
||||
property = require('./property');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.iteratee`.
|
||||
@@ -1,8 +1,8 @@
|
||||
var Reflect = require('./Reflect'),
|
||||
iteratorToArray = require('./iteratorToArray');
|
||||
var Reflect = require('./_Reflect'),
|
||||
iteratorToArray = require('./_iteratorToArray');
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = global.Object.prototype;
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Built-in value references. */
|
||||
var enumerate = Reflect ? Reflect.enumerate : undefined,
|
||||
@@ -1,5 +1,5 @@
|
||||
var baseEach = require('./baseEach'),
|
||||
isArrayLike = require('../isArrayLike');
|
||||
var baseEach = require('./_baseEach'),
|
||||
isArrayLike = require('./isArrayLike');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.map` without support for iteratee shorthands.
|
||||
@@ -1,5 +1,5 @@
|
||||
var baseIsMatch = require('./baseIsMatch'),
|
||||
getMatchData = require('./getMatchData');
|
||||
var baseIsMatch = require('./_baseIsMatch'),
|
||||
getMatchData = require('./_getMatchData');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||||
@@ -1,6 +1,6 @@
|
||||
var baseIsEqual = require('./baseIsEqual'),
|
||||
get = require('../get'),
|
||||
hasIn = require('../hasIn');
|
||||
var baseIsEqual = require('./_baseIsEqual'),
|
||||
get = require('./get'),
|
||||
hasIn = require('./hasIn');
|
||||
|
||||
/** Used to compose bitmasks for comparison styles. */
|
||||
var UNORDERED_COMPARE_FLAG = 1,
|
||||
@@ -1,11 +1,11 @@
|
||||
var Stack = require('./Stack'),
|
||||
arrayEach = require('./arrayEach'),
|
||||
assignMergeValue = require('./assignMergeValue'),
|
||||
baseMergeDeep = require('./baseMergeDeep'),
|
||||
isArray = require('../isArray'),
|
||||
isObject = require('../isObject'),
|
||||
isTypedArray = require('../isTypedArray'),
|
||||
keysIn = require('../keysIn');
|
||||
var Stack = require('./_Stack'),
|
||||
arrayEach = require('./_arrayEach'),
|
||||
assignMergeValue = require('./_assignMergeValue'),
|
||||
baseMergeDeep = require('./_baseMergeDeep'),
|
||||
isArray = require('./isArray'),
|
||||
isObject = require('./isObject'),
|
||||
isTypedArray = require('./isTypedArray'),
|
||||
keysIn = require('./keysIn');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.merge` without support for multiple sources.
|
||||
@@ -1,14 +1,14 @@
|
||||
var assignMergeValue = require('./assignMergeValue'),
|
||||
baseClone = require('./baseClone'),
|
||||
copyArray = require('./copyArray'),
|
||||
isArguments = require('../isArguments'),
|
||||
isArray = require('../isArray'),
|
||||
isArrayLikeObject = require('../isArrayLikeObject'),
|
||||
isFunction = require('../isFunction'),
|
||||
isObject = require('../isObject'),
|
||||
isPlainObject = require('../isPlainObject'),
|
||||
isTypedArray = require('../isTypedArray'),
|
||||
toPlainObject = require('../toPlainObject');
|
||||
var assignMergeValue = require('./_assignMergeValue'),
|
||||
baseClone = require('./_baseClone'),
|
||||
copyArray = require('./_copyArray'),
|
||||
isArguments = require('./isArguments'),
|
||||
isArray = require('./isArray'),
|
||||
isArrayLikeObject = require('./isArrayLikeObject'),
|
||||
isFunction = require('./isFunction'),
|
||||
isObject = require('./isObject'),
|
||||
isPlainObject = require('./isPlainObject'),
|
||||
isTypedArray = require('./isTypedArray'),
|
||||
toPlainObject = require('./toPlainObject');
|
||||
|
||||
/**
|
||||
* A specialized version of `baseMerge` for arrays and objects which performs
|
||||
@@ -27,7 +27,7 @@ var assignMergeValue = require('./assignMergeValue'),
|
||||
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
||||
var objValue = object[key],
|
||||
srcValue = source[key],
|
||||
stacked = stack.get(srcValue) || stack.get(objValue);
|
||||
stacked = stack.get(srcValue);
|
||||
|
||||
if (stacked) {
|
||||
assignMergeValue(object, key, stacked);
|
||||
@@ -46,6 +46,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
|
||||
newValue = copyArray(objValue);
|
||||
}
|
||||
else {
|
||||
isCommon = false;
|
||||
newValue = baseClone(srcValue);
|
||||
}
|
||||
}
|
||||
@@ -54,6 +55,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
|
||||
newValue = toPlainObject(objValue);
|
||||
}
|
||||
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
|
||||
isCommon = false;
|
||||
newValue = baseClone(srcValue);
|
||||
}
|
||||
else {
|
||||
@@ -1,8 +1,8 @@
|
||||
var arrayMap = require('./arrayMap'),
|
||||
baseIteratee = require('./baseIteratee'),
|
||||
baseMap = require('./baseMap'),
|
||||
baseSortBy = require('./baseSortBy'),
|
||||
compareMultiple = require('./compareMultiple');
|
||||
var arrayMap = require('./_arrayMap'),
|
||||
baseIteratee = require('./_baseIteratee'),
|
||||
baseMap = require('./_baseMap'),
|
||||
baseSortBy = require('./_baseSortBy'),
|
||||
compareMultiple = require('./_compareMultiple');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.orderBy` without param guards.
|
||||
@@ -1,4 +1,4 @@
|
||||
var arrayReduce = require('./arrayReduce');
|
||||
var arrayReduce = require('./_arrayReduce');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.pick` without support for individual
|
||||
@@ -1,4 +1,4 @@
|
||||
var baseForIn = require('./baseForIn');
|
||||
var baseForIn = require('./_baseForIn');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.pickBy` without support for iteratee shorthands.
|
||||
@@ -1,4 +1,4 @@
|
||||
var baseGet = require('./baseGet');
|
||||
var baseGet = require('./_baseGet');
|
||||
|
||||
/**
|
||||
* A specialized version of `baseProperty` which supports deep paths.
|
||||
@@ -1,4 +1,4 @@
|
||||
var basePullAllBy = require('./basePullAllBy');
|
||||
var basePullAllBy = require('./_basePullAllBy');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.pullAll`.
|
||||
@@ -1,8 +1,8 @@
|
||||
var arrayMap = require('./arrayMap'),
|
||||
baseIndexOf = require('./baseIndexOf');
|
||||
var arrayMap = require('./_arrayMap'),
|
||||
baseIndexOf = require('./_baseIndexOf');
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = global.Array.prototype;
|
||||
var arrayProto = Array.prototype;
|
||||
|
||||
/** Built-in value references. */
|
||||
var splice = arrayProto.splice;
|
||||
@@ -1,11 +1,11 @@
|
||||
var baseToPath = require('./baseToPath'),
|
||||
isIndex = require('./isIndex'),
|
||||
isKey = require('./isKey'),
|
||||
last = require('../last'),
|
||||
parent = require('./parent');
|
||||
var baseToPath = require('./_baseToPath'),
|
||||
isIndex = require('./_isIndex'),
|
||||
isKey = require('./_isKey'),
|
||||
last = require('./last'),
|
||||
parent = require('./_parent');
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = global.Array.prototype;
|
||||
var arrayProto = Array.prototype;
|
||||
|
||||
/** Built-in value references. */
|
||||
var splice = arrayProto.splice;
|
||||
@@ -1,8 +1,8 @@
|
||||
var assignValue = require('./assignValue'),
|
||||
baseToPath = require('./baseToPath'),
|
||||
isIndex = require('./isIndex'),
|
||||
isKey = require('./isKey'),
|
||||
isObject = require('../isObject');
|
||||
var assignValue = require('./_assignValue'),
|
||||
baseToPath = require('./_baseToPath'),
|
||||
isIndex = require('./_isIndex'),
|
||||
isKey = require('./_isKey'),
|
||||
isObject = require('./isObject');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.set`.
|
||||
@@ -1,5 +1,5 @@
|
||||
var identity = require('../identity'),
|
||||
metaMap = require('./metaMap');
|
||||
var identity = require('./identity'),
|
||||
metaMap = require('./_metaMap');
|
||||
|
||||
/**
|
||||
* The base implementation of `setData` without support for hot loop detection.
|
||||
@@ -1,4 +1,4 @@
|
||||
var baseEach = require('./baseEach');
|
||||
var baseEach = require('./_baseEach');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.some` without support for iteratee shorthands.
|
||||
@@ -1,5 +1,5 @@
|
||||
var baseSortedIndexBy = require('./baseSortedIndexBy'),
|
||||
identity = require('../identity');
|
||||
var baseSortedIndexBy = require('./_baseSortedIndexBy'),
|
||||
identity = require('./identity');
|
||||
|
||||
/** Used as references for the maximum length and index of an array. */
|
||||
var MAX_ARRAY_LENGTH = 4294967295,
|
||||
@@ -1,4 +1,4 @@
|
||||
var baseSortedUniqBy = require('./baseSortedUniqBy');
|
||||
var baseSortedUniqBy = require('./_baseSortedUniqBy');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.sortedUniq`.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user