index.js 750 B

12345678910111213141516171819202122232425262728
  1. 'use strict';
  2. var define = require('define-properties');
  3. var RequireObjectCoercible = require('es-abstract/2024/RequireObjectCoercible');
  4. var callBind = require('call-bind');
  5. var callBound = require('call-bind/callBound');
  6. var implementation = require('./implementation');
  7. var getPolyfill = require('./polyfill');
  8. var polyfill = callBind.apply(getPolyfill());
  9. var shim = require('./shim');
  10. var $slice = callBound('%Array.prototype.slice%');
  11. // eslint-disable-next-line no-unused-vars
  12. var boundShim = function reduce(array, callbackfn) {
  13. RequireObjectCoercible(array);
  14. return polyfill(array, $slice(arguments, 1));
  15. };
  16. define(boundShim, {
  17. getPolyfill: getPolyfill,
  18. implementation: implementation,
  19. shim: shim
  20. });
  21. module.exports = boundShim;