1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import baseAssignValue from './_baseAssignValue.js';
- import createAggregator from './_createAggregator.js';
- var objectProto = Object.prototype;
- var hasOwnProperty = objectProto.hasOwnProperty;
- var groupBy = createAggregator(function(result, value, key) {
- if (hasOwnProperty.call(result, key)) {
- result[key].push(value);
- } else {
- baseAssignValue(result, key, [value]);
- }
- });
- export default groupBy;
|