2023-12-18 13:12:25 +08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var define = require('define-properties');
|
2023-12-28 23:41:32 +08:00
|
|
|
var RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');
|
|
|
|
var callBind = require('call-bind');
|
|
|
|
var callBound = require('call-bind/callBound');
|
2023-12-18 13:12:25 +08:00
|
|
|
|
|
|
|
var implementation = require('./implementation');
|
|
|
|
var getPolyfill = require('./polyfill');
|
2023-12-28 23:41:32 +08:00
|
|
|
var polyfill = callBind.apply(getPolyfill());
|
2023-12-18 13:12:25 +08:00
|
|
|
var shim = require('./shim');
|
|
|
|
|
2023-12-28 23:41:32 +08:00
|
|
|
var $slice = callBound('Array.prototype.slice');
|
2023-12-18 13:12:25 +08:00
|
|
|
|
|
|
|
/* eslint-disable no-unused-vars */
|
2023-12-28 23:41:32 +08:00
|
|
|
var boundShim = function includes(array, searchElement) {
|
2023-12-18 13:12:25 +08:00
|
|
|
/* eslint-enable no-unused-vars */
|
2023-12-28 23:41:32 +08:00
|
|
|
RequireObjectCoercible(array);
|
|
|
|
return polyfill(array, $slice(arguments, 1));
|
2023-12-18 13:12:25 +08:00
|
|
|
};
|
2023-12-28 23:41:32 +08:00
|
|
|
define(boundShim, {
|
2023-12-18 13:12:25 +08:00
|
|
|
getPolyfill: getPolyfill,
|
|
|
|
implementation: implementation,
|
|
|
|
shim: shim
|
|
|
|
});
|
|
|
|
|
2023-12-28 23:41:32 +08:00
|
|
|
module.exports = boundShim;
|