key-by.js 1.2 KB

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. require('../../modules/es.object.to-string');
  3. require('../../modules/es.map');
  4. require('../../modules/esnext.map.key-by');
  5. require('../../modules/esnext.map.delete-all');
  6. require('../../modules/esnext.map.emplace');
  7. require('../../modules/esnext.map.every');
  8. require('../../modules/esnext.map.filter');
  9. require('../../modules/esnext.map.find');
  10. require('../../modules/esnext.map.find-key');
  11. require('../../modules/esnext.map.get-or-insert');
  12. require('../../modules/esnext.map.get-or-insert-computed');
  13. require('../../modules/esnext.map.includes');
  14. require('../../modules/esnext.map.key-of');
  15. require('../../modules/esnext.map.map-keys');
  16. require('../../modules/esnext.map.map-values');
  17. require('../../modules/esnext.map.merge');
  18. require('../../modules/esnext.map.reduce');
  19. require('../../modules/esnext.map.some');
  20. require('../../modules/esnext.map.update');
  21. var call = require('../../internals/function-call');
  22. var isCallable = require('../../internals/is-callable');
  23. var path = require('../../internals/path');
  24. var Map = path.Map;
  25. var mapKeyBy = Map.keyBy;
  26. module.exports = function keyBy(source, iterable, keyDerivative) {
  27. return call(mapKeyBy, isCallable(this) ? this : Map, source, iterable, keyDerivative);
  28. };