mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07: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';
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
@@ -4417,7 +4407,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