mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 20:07:49 +00:00
Remove dependencyObject.
Former-commit-id: 374611a2f1180402700fad5ba7f86e390150d37b
This commit is contained in:
14
lodash.js
14
lodash.js
@@ -21,9 +21,6 @@
|
||||
/** Used internally to indicate various things */
|
||||
var indicatorObject = {};
|
||||
|
||||
/** Used to avoid reference errors and circular dependency errors */
|
||||
var dependencyObject = {};
|
||||
|
||||
/** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */
|
||||
var keyPrefix = +new Date + '';
|
||||
|
||||
@@ -1121,8 +1118,7 @@
|
||||
* @returns {Function} Returns the compiled function.
|
||||
*/
|
||||
function createIterator() {
|
||||
var data = getObject(),
|
||||
keys = dependencyObject.keys;
|
||||
var data = getObject();
|
||||
|
||||
// data properties
|
||||
data.shadowedProps = shadowedProps;
|
||||
@@ -1335,7 +1331,7 @@
|
||||
* _.keys({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
* // => ['one', 'two', 'three'] (order is not guaranteed)
|
||||
*/
|
||||
var keys = dependencyObject.keys = !nativeKeys ? shimKeys : function(object) {
|
||||
var keys = !nativeKeys ? shimKeys : function(object) {
|
||||
if (!isObject(object)) {
|
||||
return [];
|
||||
}
|
||||
@@ -1917,7 +1913,7 @@
|
||||
* });
|
||||
* // => true
|
||||
*/
|
||||
var isEqual = dependencyObject.isEqual = function(a, b, callback, thisArg, stackA, stackB) {
|
||||
function isEqual(a, b, callback, thisArg, stackA, stackB) {
|
||||
// used to indicate that when comparing objects, `a` has at least the properties of `b`
|
||||
var whereIndicator = callback === indicatorObject;
|
||||
if (typeof callback == 'function' && !whereIndicator) {
|
||||
@@ -2073,7 +2069,7 @@
|
||||
releaseArray(stackB);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is, or can be coerced to, a finite number.
|
||||
@@ -4767,7 +4763,7 @@
|
||||
var length = props.length,
|
||||
result = false;
|
||||
while (length--) {
|
||||
if (!(result = dependencyObject.isEqual(object[props[length]], func[props[length]], indicatorObject))) {
|
||||
if (!(result = isEqual(object[props[length]], func[props[length]], indicatorObject))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user