index.js 779 B

123456789101112131415161718192021222324252627
  1. 'use strict';
  2. var define = require('define-properties');
  3. var RequireObjectCoercible = require('es-abstract/2022/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 no-unused-vars */
  12. var boundShim = function includes(array, searchElement) {
  13. /* eslint-enable no-unused-vars */
  14. RequireObjectCoercible(array);
  15. return polyfill(array, $slice(arguments, 1));
  16. };
  17. define(boundShim, {
  18. getPolyfill: getPolyfill,
  19. implementation: implementation,
  20. shim: shim
  21. });
  22. module.exports = boundShim;