mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Bump to v3.1.0.
This commit is contained in:
committed by
John-David Dalton
parent
3b2df88eab
commit
1608d89174
@@ -22,7 +22,7 @@ define(['./baseMatches', './baseProperty', './bindCallback', '../utility/identit
|
||||
}
|
||||
// Handle "_.property" and "_.matches" style callback shorthands.
|
||||
return type == 'object'
|
||||
? baseMatches(func, !argCount)
|
||||
? baseMatches(func)
|
||||
: baseProperty(func + '');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
define(['./baseClone', './baseIsMatch', './isStrictComparable', '../object/keys'], function(baseClone, baseIsMatch, isStrictComparable, keys) {
|
||||
define(['./baseIsMatch', './isStrictComparable', '../object/keys'], function(baseIsMatch, isStrictComparable, keys) {
|
||||
|
||||
/** Used for native method references. */
|
||||
var objectProto = Object.prototype;
|
||||
@@ -12,10 +12,9 @@ define(['./baseClone', './baseIsMatch', './isStrictComparable', '../object/keys'
|
||||
*
|
||||
* @private
|
||||
* @param {Object} source The object of property values to match.
|
||||
* @param {boolean} [isCloned] Specify cloning the source object.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseMatches(source, isCloned) {
|
||||
function baseMatches(source) {
|
||||
var props = keys(source),
|
||||
length = props.length;
|
||||
|
||||
@@ -29,9 +28,6 @@ define(['./baseClone', './baseIsMatch', './isStrictComparable', '../object/keys'
|
||||
};
|
||||
}
|
||||
}
|
||||
if (isCloned) {
|
||||
source = baseClone(source, true);
|
||||
}
|
||||
var values = Array(length),
|
||||
strictCompareFlags = Array(length);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ define([], function() {
|
||||
|
||||
/**
|
||||
* Used as the maximum length of an array-like value.
|
||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
|
||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
||||
* for more details.
|
||||
*/
|
||||
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
||||
|
||||
@@ -18,7 +18,7 @@ define(['./isIndex', './isLength', '../lang/isObject'], function(isIndex, isLeng
|
||||
var length = object.length,
|
||||
prereq = isLength(length) && isIndex(index, length);
|
||||
} else {
|
||||
prereq = type == 'string' && index in value;
|
||||
prereq = type == 'string' && index in object;
|
||||
}
|
||||
return prereq && object[index] === value;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ define([], function() {
|
||||
|
||||
/**
|
||||
* Used as the maximum length of an array-like value.
|
||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
|
||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
||||
* for more details.
|
||||
*/
|
||||
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
||||
@@ -10,6 +10,10 @@ define([], function() {
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is based on ES `ToLength`. See the
|
||||
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
|
||||
* for more details.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||||
|
||||
Reference in New Issue
Block a user