mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Rebuild files and docs.
Former-commit-id: 1e3b1e236e15e4248247a4b20288ab2e153ce753
This commit is contained in:
531
dist/lodash.js
vendored
531
dist/lodash.js
vendored
@@ -141,6 +141,166 @@
|
||||
'\u2029': 'u2029'
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* A basic implementation of `_.indexOf` without support for binary searches
|
||||
* or `fromIndex` constraints.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Mixed} value The value to search for.
|
||||
* @param {Number} [fromIndex=0] The index to search from.
|
||||
* @returns {Number} Returns the index of the matched value or `-1`.
|
||||
*/
|
||||
function basicIndexOf(array, value, fromIndex) {
|
||||
var index = (fromIndex || 0) - 1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (array[index] === value) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* An implementation of `_.contains` for cache objects that mimics the return
|
||||
* signature of `_.indexOf` by returning `0` if the value is found, else `-1`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} cache The cache object to inspect.
|
||||
* @param {Mixed} value The value to search for.
|
||||
* @returns {Number} Returns `0` if `value` is found, else `-1`.
|
||||
*/
|
||||
function cacheIndexOf(cache, value) {
|
||||
var type = typeof value;
|
||||
cache = cache.cache;
|
||||
|
||||
if (type == 'boolean' || value == null) {
|
||||
return cache[value];
|
||||
}
|
||||
if (type != 'number' && type != 'string') {
|
||||
type = 'object';
|
||||
}
|
||||
var key = type == 'number' ? value : keyPrefix + value;
|
||||
cache = cache[type] || (cache[type] = {});
|
||||
|
||||
return type == 'object'
|
||||
? (cache[key] && basicIndexOf(cache[key], value) > -1 ? 0 : -1)
|
||||
: (cache[key] ? 0 : -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a given `value` to the corresponding cache object.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to add to the cache.
|
||||
*/
|
||||
function cachePush(value) {
|
||||
var cache = this.cache,
|
||||
type = typeof value;
|
||||
|
||||
if (type == 'boolean' || value == null) {
|
||||
cache[value] = true;
|
||||
} else {
|
||||
if (type != 'number' && type != 'string') {
|
||||
type = 'object';
|
||||
}
|
||||
var key = type == 'number' ? value : keyPrefix + value,
|
||||
typeCache = cache[type] || (cache[type] = {});
|
||||
|
||||
if (type == 'object') {
|
||||
if ((typeCache[key] || (typeCache[key] = [])).push(value) == this.array.length) {
|
||||
cache[type] = false;
|
||||
}
|
||||
} else {
|
||||
typeCache[key] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `_.max` and `_.min` as the default `callback` when a given
|
||||
* `collection` is a string value.
|
||||
*
|
||||
* @private
|
||||
* @param {String} value The character to inspect.
|
||||
* @returns {Number} Returns the code unit of given character.
|
||||
*/
|
||||
function charAtCallback(value) {
|
||||
return value.charCodeAt(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `sortBy` to compare transformed `collection` values, stable sorting
|
||||
* them in ascending order.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} a The object to compare to `b`.
|
||||
* @param {Object} b The object to compare to `a`.
|
||||
* @returns {Number} Returns the sort order indicator of `1` or `-1`.
|
||||
*/
|
||||
function compareAscending(a, b) {
|
||||
var ai = a.index,
|
||||
bi = b.index;
|
||||
|
||||
a = a.criteria;
|
||||
b = b.criteria;
|
||||
|
||||
// ensure a stable sort in V8 and other engines
|
||||
// http://code.google.com/p/v8/issues/detail?id=90
|
||||
if (a !== b) {
|
||||
if (a > b || typeof a == 'undefined') {
|
||||
return 1;
|
||||
}
|
||||
if (a < b || typeof b == 'undefined') {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return ai < bi ? -1 : 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a cache object to optimize linear searches of large arrays.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array=[]] The array to search.
|
||||
* @returns {Null|Object} Returns the cache object or `null` if caching should not be used.
|
||||
*/
|
||||
function createCache(array) {
|
||||
var index = -1,
|
||||
length = array.length;
|
||||
|
||||
var cache = getObject();
|
||||
cache['false'] = cache['null'] = cache['true'] = cache['undefined'] = false;
|
||||
|
||||
var result = getObject();
|
||||
result.array = array;
|
||||
result.cache = cache;
|
||||
result.push = cachePush;
|
||||
|
||||
while (++index < length) {
|
||||
result.push(array[index]);
|
||||
}
|
||||
return cache.object === false
|
||||
? (releaseObject(result), null)
|
||||
: result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `template` to escape characters for inclusion in compiled
|
||||
* string literals.
|
||||
*
|
||||
* @private
|
||||
* @param {String} match The matched character to escape.
|
||||
* @returns {String} Returns the escaped character.
|
||||
*/
|
||||
function escapeStringChar(match) {
|
||||
return '\\' + stringEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array from the array pool or creates a new one if the pool is empty.
|
||||
*
|
||||
@@ -160,18 +320,13 @@
|
||||
function getObject() {
|
||||
return objectPool.pop() || {
|
||||
'array': null,
|
||||
'contains': null,
|
||||
'criteria': null,
|
||||
'false': null,
|
||||
'function': null,
|
||||
'index': null,
|
||||
'indexOf': null,
|
||||
'initedArray': null,
|
||||
'null': null,
|
||||
'number': null,
|
||||
'object': null,
|
||||
'push': null,
|
||||
'release': null,
|
||||
'string': null,
|
||||
'true': null,
|
||||
'undefined': null,
|
||||
@@ -179,6 +334,15 @@
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* A no-operation function.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function noop() {
|
||||
// no operation performed
|
||||
}
|
||||
|
||||
/**
|
||||
* Releases the given `array` back to the array pool.
|
||||
*
|
||||
@@ -200,6 +364,10 @@
|
||||
* @param {Object} [object] The object to release.
|
||||
*/
|
||||
function releaseObject(object) {
|
||||
var cache = object.cache;
|
||||
if (cache) {
|
||||
releaseObject(cache);
|
||||
}
|
||||
if (objectPool.length == maxPoolSize) {
|
||||
objectPool.length = maxPoolSize - 1;
|
||||
}
|
||||
@@ -207,6 +375,34 @@
|
||||
objectPool.push(object);
|
||||
}
|
||||
|
||||
/**
|
||||
* Slices the `collection` from the `start` index up to, but not including,
|
||||
* the `end` index.
|
||||
*
|
||||
* Note: This function is used, instead of `Array#slice`, to support node lists
|
||||
* in IE < 9 and to ensure dense arrays are returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object|String} collection The collection to slice.
|
||||
* @param {Number} start The start index.
|
||||
* @param {Number} end The end index.
|
||||
* @returns {Array} Returns the new array.
|
||||
*/
|
||||
function slice(array, start, end) {
|
||||
start || (start = 0);
|
||||
if (typeof end == 'undefined') {
|
||||
end = array ? array.length : 0;
|
||||
}
|
||||
var index = -1,
|
||||
length = end - start || 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
|
||||
while (++index < length) {
|
||||
result[index] = array[start + index];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
@@ -364,6 +560,19 @@
|
||||
: new lodashWrapper(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* A fast path for creating `lodash` wrapper objects.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to wrap in a `lodash` instance.
|
||||
* @returns {Object} Returns a `lodash` instance.
|
||||
*/
|
||||
function lodashWrapper(value) {
|
||||
this.__wrapped__ = value;
|
||||
}
|
||||
// ensure `new lodashWrapper` is an instance of `lodash`
|
||||
lodashWrapper.prototype = lodash.prototype;
|
||||
|
||||
/**
|
||||
* An object used to flag environments features.
|
||||
*
|
||||
@@ -444,69 +653,6 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* A basic version of `_.indexOf` without support for binary searches
|
||||
* or `fromIndex` constraints.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Mixed} value The value to search for.
|
||||
* @param {Number} [fromIndex=0] The index to search from.
|
||||
* @returns {Number} Returns the index of the matched value or `-1`.
|
||||
*/
|
||||
function basicIndexOf(array, value, fromIndex) {
|
||||
var index = (fromIndex || 0) - 1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (array[index] === value) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `_.max` and `_.min` as the default `callback` when a given
|
||||
* `collection` is a string value.
|
||||
*
|
||||
* @private
|
||||
* @param {String} value The character to inspect.
|
||||
* @returns {Number} Returns the code unit of given character.
|
||||
*/
|
||||
function charAtCallback(value) {
|
||||
return value.charCodeAt(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `sortBy` to compare transformed `collection` values, stable sorting
|
||||
* them in ascending order.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} a The object to compare to `b`.
|
||||
* @param {Object} b The object to compare to `a`.
|
||||
* @returns {Number} Returns the sort order indicator of `1` or `-1`.
|
||||
*/
|
||||
function compareAscending(a, b) {
|
||||
var ai = a.index,
|
||||
bi = b.index;
|
||||
|
||||
a = a.criteria;
|
||||
b = b.criteria;
|
||||
|
||||
// ensure a stable sort in V8 and other engines
|
||||
// http://code.google.com/p/v8/issues/detail?id=90
|
||||
if (a !== b) {
|
||||
if (a > b || typeof a == 'undefined') {
|
||||
return 1;
|
||||
}
|
||||
if (a < b || typeof b == 'undefined') {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return ai < bi ? -1 : 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that, when called, invokes `func` with the `this` binding
|
||||
* of `thisArg` and prepends any `partialArgs` to the arguments passed to the
|
||||
@@ -565,109 +711,6 @@
|
||||
return bound;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function optimized to search large arrays for a given `value`,
|
||||
* starting at `fromIndex`, using strict equality for comparisons, i.e. `===`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array=[]] The array to search.
|
||||
* @param {Mixed} value The value to search for.
|
||||
* @returns {Boolean} Returns `true`, if `value` is found, else `false`.
|
||||
*/
|
||||
var createCache = (function() {
|
||||
|
||||
function basicContains(value) {
|
||||
return this.indexOf(this.array, value) > -1;
|
||||
}
|
||||
|
||||
function basicPush(value) {
|
||||
this.array.push(value);
|
||||
}
|
||||
|
||||
function cacheContains(value) {
|
||||
var cache = this.cache,
|
||||
type = typeof value;
|
||||
|
||||
if (type == 'boolean' || value == null) {
|
||||
return cache[value];
|
||||
}
|
||||
if (type != 'number' && type != 'string') {
|
||||
type = 'object';
|
||||
}
|
||||
var key = type == 'number' ? value : keyPrefix + value;
|
||||
cache = cache[type] || (cache[type] = {});
|
||||
|
||||
return type == 'object'
|
||||
? (cache[key] ? basicIndexOf(cache[key], value) > -1 : false)
|
||||
: !!cache[key];
|
||||
}
|
||||
|
||||
function cachePush(value) {
|
||||
var cache = this.cache,
|
||||
type = typeof value;
|
||||
|
||||
if (type == 'boolean' || value == null) {
|
||||
cache[value] = true;
|
||||
} else {
|
||||
if (type != 'number' && type != 'string') {
|
||||
type = 'object';
|
||||
}
|
||||
var key = type == 'number' ? value : keyPrefix + value;
|
||||
cache = cache[type] || (cache[type] = {});
|
||||
|
||||
if (type == 'object') {
|
||||
bailout = (cache[key] || (cache[key] = [])).push(value) == length;
|
||||
} else {
|
||||
cache[key] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function release() {
|
||||
var cache = this.cache;
|
||||
if (cache.initedArray) {
|
||||
releaseArray(this.array);
|
||||
}
|
||||
releaseObject(cache);
|
||||
}
|
||||
|
||||
return function(array) {
|
||||
var bailout,
|
||||
index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
initedArray = !array && (array = getArray()),
|
||||
length = array.length,
|
||||
isLarge = length >= largeArraySize && lodash.indexOf !== indexOf;
|
||||
|
||||
var cache = getObject();
|
||||
cache.initedArray = initedArray;
|
||||
cache['false'] = cache['function'] = cache['null'] = cache['true'] = cache['undefined'] = false;
|
||||
|
||||
var result = getObject();
|
||||
result.array = array;
|
||||
result.cache = cache;
|
||||
result.contains = cacheContains;
|
||||
result.indexOf = indexOf;
|
||||
result.push = cachePush;
|
||||
result.release = release;
|
||||
|
||||
if (isLarge) {
|
||||
while (++index < length) {
|
||||
result.push(array[index]);
|
||||
}
|
||||
if (bailout) {
|
||||
isLarge = false;
|
||||
result.release();
|
||||
}
|
||||
}
|
||||
if (!isLarge) {
|
||||
result.contains = basicContains;
|
||||
result.push = basicPush;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}());
|
||||
|
||||
/**
|
||||
* Creates a new object with the specified `prototype`.
|
||||
*
|
||||
@@ -690,18 +733,6 @@
|
||||
return htmlEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `template` to escape characters for inclusion in compiled
|
||||
* string literals.
|
||||
*
|
||||
* @private
|
||||
* @param {String} match The matched character to escape.
|
||||
* @returns {String} Returns the escaped character.
|
||||
*/
|
||||
function escapeStringChar(match) {
|
||||
return '\\' + stringEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the appropriate "indexOf" function. If the `_.indexOf` method is
|
||||
* customized, this method returns the custom method, otherwise it returns
|
||||
@@ -715,28 +746,6 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A fast path for creating `lodash` wrapper objects.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to wrap in a `lodash` instance.
|
||||
* @returns {Object} Returns a `lodash` instance.
|
||||
*/
|
||||
function lodashWrapper(value) {
|
||||
this.__wrapped__ = value;
|
||||
}
|
||||
// ensure `new lodashWrapper` is an instance of `lodash`
|
||||
lodashWrapper.prototype = lodash.prototype;
|
||||
|
||||
/**
|
||||
* A no-operation function.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function noop() {
|
||||
// no operation performed
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that juggles arguments, allowing argument overloading
|
||||
* for `_.flatten` and `_.uniq`, before passing them to the given `func`.
|
||||
@@ -788,34 +797,6 @@
|
||||
return result === undefined || hasOwnProperty.call(value, result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Slices the `collection` from the `start` index up to, but not including,
|
||||
* the `end` index.
|
||||
*
|
||||
* Note: This function is used, instead of `Array#slice`, to support node lists
|
||||
* in IE < 9 and to ensure dense arrays are returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object|String} collection The collection to slice.
|
||||
* @param {Number} start The start index.
|
||||
* @param {Number} end The end index.
|
||||
* @returns {Array} Returns the new array.
|
||||
*/
|
||||
function slice(array, start, end) {
|
||||
start || (start = 0);
|
||||
if (typeof end == 'undefined') {
|
||||
end = array ? array.length : 0;
|
||||
}
|
||||
var index = -1,
|
||||
length = end - start || 0,
|
||||
result = Array(length < 0 ? 0 : length);
|
||||
|
||||
while (++index < length) {
|
||||
result[index] = array[start + index];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `unescape` to convert HTML entities to characters.
|
||||
*
|
||||
@@ -1123,7 +1104,7 @@
|
||||
* `undefined`, cloning will be handled by the method instead. The `callback`
|
||||
* is bound to `thisArg` and invoked with one argument; (value).
|
||||
*
|
||||
* Note: This function is loosely based on the structured clone algorithm. Functions
|
||||
* Note: This method is loosely based on the structured clone algorithm. Functions
|
||||
* and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and
|
||||
* objects created by constructors other than `Object` are cloned to plain `Object` objects.
|
||||
* See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm.
|
||||
@@ -3321,18 +3302,31 @@
|
||||
*/
|
||||
function difference(array) {
|
||||
var index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array ? array.length : 0,
|
||||
flattened = concat.apply(arrayProto, nativeSlice.call(arguments, 1)),
|
||||
cache = createCache(flattened),
|
||||
seen = concat.apply(arrayProto, nativeSlice.call(arguments, 1)),
|
||||
result = [];
|
||||
|
||||
var isLarge = length >= largeArraySize && indexOf === basicIndexOf;
|
||||
|
||||
if (isLarge) {
|
||||
var cache = createCache(seen);
|
||||
if (cache) {
|
||||
indexOf = cacheIndexOf;
|
||||
seen = cache;
|
||||
} else {
|
||||
isLarge = false;
|
||||
}
|
||||
}
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
if (!cache.contains(value)) {
|
||||
if (indexOf(seen, value) < 0) {
|
||||
result.push(value);
|
||||
}
|
||||
}
|
||||
cache.release();
|
||||
if (isLarge) {
|
||||
releaseObject(seen);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -3636,24 +3630,31 @@
|
||||
function intersection(array) {
|
||||
var args = arguments,
|
||||
argsLength = args.length,
|
||||
argsIndex = -1,
|
||||
caches = getArray(),
|
||||
index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array ? array.length : 0,
|
||||
result = [];
|
||||
|
||||
var caches = getArray();
|
||||
caches[0] = createCache();
|
||||
result = [],
|
||||
seen = getArray();
|
||||
|
||||
while (++argsIndex < argsLength) {
|
||||
var value = args[argsIndex];
|
||||
caches[argsIndex] = indexOf === basicIndexOf &&
|
||||
(value ? value.length : 0) >= largeArraySize &&
|
||||
createCache(argsIndex ? args[argsIndex] : seen);
|
||||
}
|
||||
outer:
|
||||
while (++index < length) {
|
||||
var cache = caches[0],
|
||||
value = array[index];
|
||||
var cache = caches[0];
|
||||
value = array[index];
|
||||
|
||||
if (!cache.contains(value)) {
|
||||
var argsIndex = argsLength;
|
||||
cache.push(value);
|
||||
if ((cache ? cacheIndexOf(cache, value) : indexOf(seen, value)) < 0) {
|
||||
argsIndex = argsLength;
|
||||
(cache || seen).push(value);
|
||||
while (--argsIndex) {
|
||||
cache = caches[argsIndex] || (caches[argsIndex] = createCache(args[argsIndex]));
|
||||
if (!cache.contains(value)) {
|
||||
cache = caches[argsIndex];
|
||||
if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value)) < 0) {
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
@@ -3661,9 +3662,13 @@
|
||||
}
|
||||
}
|
||||
while (argsLength--) {
|
||||
caches[argsLength].release();
|
||||
cache = caches[argsLength];
|
||||
if (cache) {
|
||||
releaseObject(cache);
|
||||
}
|
||||
}
|
||||
releaseArray(caches);
|
||||
releaseArray(seen);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -4035,17 +4040,28 @@
|
||||
var index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array ? array.length : 0,
|
||||
isLarge = !isSorted && length >= largeArraySize && lodash.indexOf !== indexOf,
|
||||
result = [],
|
||||
seen = isLarge ? createCache() : (callback ? getArray() : result);
|
||||
result = [];
|
||||
|
||||
var isLarge = !isSorted && length >= largeArraySize && indexOf === basicIndexOf,
|
||||
seen = (callback || isLarge) ? getArray() : result;
|
||||
|
||||
if (isLarge) {
|
||||
var cache = createCache(seen);
|
||||
if (cache) {
|
||||
indexOf = cacheIndexOf;
|
||||
seen = cache;
|
||||
} else {
|
||||
isLarge = false;
|
||||
seen = callback ? seen : (releaseArray(seen), result);
|
||||
}
|
||||
}
|
||||
while (++index < length) {
|
||||
var value = array[index],
|
||||
computed = callback ? callback(value, index, array) : value;
|
||||
|
||||
if (isSorted
|
||||
? !index || seen[seen.length - 1] !== computed
|
||||
: (isLarge ? !seen.contains(computed) : indexOf(seen, computed) < 0)
|
||||
: indexOf(seen, computed) < 0
|
||||
) {
|
||||
if (callback || isLarge) {
|
||||
seen.push(computed);
|
||||
@@ -4054,7 +4070,8 @@
|
||||
}
|
||||
}
|
||||
if (isLarge) {
|
||||
seen.release();
|
||||
releaseArray(seen.array);
|
||||
releaseObject(seen);
|
||||
} else if (callback) {
|
||||
releaseArray(seen);
|
||||
}
|
||||
@@ -4778,7 +4795,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* This function returns the first argument passed to it.
|
||||
* This method returns the first argument passed to it.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -4827,7 +4844,7 @@
|
||||
|
||||
push.apply(args, arguments);
|
||||
var result = func.apply(lodash, args);
|
||||
return (value && typeof value == 'object' && value == result)
|
||||
return (value && typeof value == 'object' && value === result)
|
||||
? this
|
||||
: new lodashWrapper(result);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user