index.js 784 B

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