mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Inline partitionInitializer.
This commit is contained in:
12
lodash.js
12
lodash.js
@@ -463,16 +463,6 @@
|
|||||||
return typeof value.toString != 'function' && typeof (value + '') == 'string';
|
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
|
* A fallback implementation of `String#trim` to remove leading and trailing
|
||||||
* whitespace or specified characters from `string`.
|
* whitespace or specified characters from `string`.
|
||||||
@@ -4417,7 +4407,7 @@
|
|||||||
*/
|
*/
|
||||||
var partition = createAggregator(function(result, value, key) {
|
var partition = createAggregator(function(result, value, key) {
|
||||||
result[key ? 0 : 1].push(value);
|
result[key ? 0 : 1].push(value);
|
||||||
}, partitionInitializer);
|
}, function() { return [[], []]; });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the value of a specified property from all elements in the collection.
|
* Retrieves the value of a specified property from all elements in the collection.
|
||||||
|
|||||||
Reference in New Issue
Block a user