mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Rebuild dist.
This commit is contained in:
25
dist/lodash.compat.js
vendored
25
dist/lodash.compat.js
vendored
@@ -464,16 +464,6 @@
|
||||
return typeof value.toString != 'function' && typeof (value + '') == 'string';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `_.partition` to create partitioned arrays.
|
||||
*
|
||||
* @private
|
||||
* @returns {Array} Returns the new array.
|
||||
*/
|
||||
function partitionInitializer() {
|
||||
return [[], []];
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `String#trim` to remove leading and trailing
|
||||
* whitespace or specified characters from `string`.
|
||||
@@ -3701,23 +3691,14 @@
|
||||
function contains(collection, target, fromIndex) {
|
||||
var length = collection ? collection.length : 0;
|
||||
if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) {
|
||||
var props = keys(collection);
|
||||
length = props.length;
|
||||
collection = values(collection);
|
||||
length = collection.length;
|
||||
}
|
||||
if (typeof fromIndex == 'number') {
|
||||
fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
|
||||
} else {
|
||||
fromIndex = 0;
|
||||
}
|
||||
if (props) {
|
||||
while (fromIndex < length) {
|
||||
var value = collection[props[fromIndex++]];
|
||||
if (value === target) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (typeof collection == 'string' || !isArray(collection) && isString(collection)) {
|
||||
if (fromIndex >= length) {
|
||||
return false;
|
||||
@@ -4398,7 +4379,7 @@
|
||||
*/
|
||||
var partition = createAggregator(function(result, value, key) {
|
||||
result[key ? 0 : 1].push(value);
|
||||
}, partitionInitializer);
|
||||
}, function() { return [[], []]; });
|
||||
|
||||
/**
|
||||
* Retrieves the value of a specified property from all elements in the collection.
|
||||
|
||||
Reference in New Issue
Block a user