mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Rebuild dist.
This commit is contained in:
42
dist/lodash.js
vendored
42
dist/lodash.js
vendored
@@ -466,8 +466,8 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `String#trimLeft` to remove leading whitespace or
|
||||
* specified characters from `string`.
|
||||
* A fallback implementation of `String#trimLeft` to remove leading whitespace
|
||||
* or specified characters from `string`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to trim.
|
||||
@@ -487,8 +487,8 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `String#trimRight` to remove trailing whitespace or
|
||||
* specified characters from `string`.
|
||||
* A fallback implementation of `String#trimRight` to remove trailing whitespace
|
||||
* or specified characters from `string`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to trim.
|
||||
@@ -656,7 +656,7 @@
|
||||
nativeTrimLeft = isNative(nativeTrimLeft = stringProto.trimLeft) && !nativeTrimLeft.call(whitespace) && nativeTrimLeft,
|
||||
nativeTrimRight = isNative(nativeTrimRight = stringProto.trimRight) && !nativeTrimRight.call(whitespace) && nativeTrimRight;
|
||||
|
||||
/** Used to lookup a built-in constructor by `[[Class]]` */
|
||||
/** Used to lookup built-in constructors by `[[Class]]` */
|
||||
var ctorByClass = {};
|
||||
ctorByClass[arrayClass] = Array;
|
||||
ctorByClass[boolClass] = Boolean;
|
||||
@@ -1006,7 +1006,6 @@
|
||||
return result;
|
||||
}
|
||||
}
|
||||
// inspect `[[Class]]`
|
||||
var isObj = isObject(value);
|
||||
if (isObj) {
|
||||
var className = toString.call(value);
|
||||
@@ -1067,7 +1066,7 @@
|
||||
stackB.push(result);
|
||||
|
||||
// recursively populate clone (susceptible to call stack limits)
|
||||
(isArr ? baseEach : baseForOwn)(value, function(valValue, key) {
|
||||
(isArr ? arrayEach : baseForOwn)(value, function(valValue, key) {
|
||||
result[key] = baseClone(valValue, isDeep, callback, stackA, stackB);
|
||||
});
|
||||
|
||||
@@ -1507,7 +1506,6 @@
|
||||
(valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object'))) {
|
||||
return false;
|
||||
}
|
||||
// compare `[[Class]]` names
|
||||
var valClass = toString.call(value),
|
||||
othClass = toString.call(other),
|
||||
valIsArg = valClass == argsClass,
|
||||
@@ -1659,7 +1657,7 @@
|
||||
* @param {Array} [stackB=[]] Associates values with source counterparts.
|
||||
*/
|
||||
function baseMerge(object, source, callback, stackA, stackB) {
|
||||
(isArray(source) ? baseEach : baseForOwn)(source, function(source, key) {
|
||||
(isArray(source) ? arrayEach : baseForOwn)(source, function(source, key) {
|
||||
var found,
|
||||
isArr,
|
||||
result = source,
|
||||
@@ -2085,10 +2083,9 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* A fallback implementation of `_.isPlainObject` which checks if `value` is
|
||||
* an object created by the `Object` constructor, assuming objects created
|
||||
* by the `Object` constructor have no inherited enumerable properties and
|
||||
* that there are no `Object.prototype` extensions.
|
||||
* A fallback implementation of `_.isPlainObject` which checks if `value`
|
||||
* is an object created by the `Object` constructor or has a `[[Prototype]]`
|
||||
* of `null`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
@@ -5100,7 +5097,7 @@
|
||||
* // => { 'name': 'penelope', 'age': 1 }
|
||||
*/
|
||||
function memoize(func, resolver) {
|
||||
if (!isFunction(func)) {
|
||||
if (!isFunction(func) || (resolver && !isFunction(resolver))) {
|
||||
throw new TypeError;
|
||||
}
|
||||
var memoized = function() {
|
||||
@@ -6240,7 +6237,11 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is an object created by the `Object` constructor.
|
||||
* Checks if `value` is an object created by the `Object` constructor or has
|
||||
* a `[[Prototype]]` of `null`.
|
||||
*
|
||||
* Note: This method assumes objects created by the `Object` constructor
|
||||
* have no inherited enumerable properties.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -6262,6 +6263,9 @@
|
||||
*
|
||||
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
||||
* // => true
|
||||
*
|
||||
* _.isPlainObject(Object.create(null));
|
||||
* // => true
|
||||
*/
|
||||
var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) {
|
||||
if (!(value && toString.call(value) == objectClass)) {
|
||||
@@ -6700,7 +6704,7 @@
|
||||
}
|
||||
if (callback) {
|
||||
callback = lodash.createCallback(callback, thisArg, 4);
|
||||
(isArr ? baseEach : baseForOwn)(object, function(value, index, object) {
|
||||
(isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {
|
||||
return callback(accumulator, value, index, object);
|
||||
});
|
||||
}
|
||||
@@ -8236,7 +8240,7 @@
|
||||
lodash.prototype.valueOf = wrapperValueOf;
|
||||
|
||||
// add `Array` functions that return unwrapped values
|
||||
baseEach(['join', 'pop', 'shift'], function(methodName) {
|
||||
arrayEach(['join', 'pop', 'shift'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
var chainAll = this.__chain__,
|
||||
@@ -8249,7 +8253,7 @@
|
||||
});
|
||||
|
||||
// add `Array` functions that return the existing wrapped value
|
||||
baseEach(['push', 'reverse', 'sort', 'unshift'], function(methodName) {
|
||||
arrayEach(['push', 'reverse', 'sort', 'unshift'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
func.apply(this.__wrapped__, arguments);
|
||||
@@ -8258,7 +8262,7 @@
|
||||
});
|
||||
|
||||
// add `Array` functions that return new wrapped values
|
||||
baseEach(['concat', 'splice'], function(methodName) {
|
||||
arrayEach(['concat', 'splice'], function(methodName) {
|
||||
var func = arrayRef[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
return new lodashWrapper(func.apply(this.__wrapped__, arguments), this.__chain__);
|
||||
|
||||
Reference in New Issue
Block a user