indexBy.js 248 B

1234567
  1. import group from './_group.js';
  2. // Indexes the object's values by a criterion, similar to `_.groupBy`, but for
  3. // when you know that your index values will be unique.
  4. export default group(function(result, value, key) {
  5. result[key] = value;
  6. });