2020-08-25 23:57:08 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var define = require('define-properties');
|
2021-02-26 03:58:33 +00:00
|
|
|
var RequireObjectCoercible = require('es-abstract/2020/RequireObjectCoercible');
|
|
|
|
var callBind = require('call-bind');
|
|
|
|
var callBound = require('call-bind/callBound');
|
2020-08-25 23:57:08 +00:00
|
|
|
|
|
|
|
var implementation = require('./implementation');
|
|
|
|
var getPolyfill = require('./polyfill');
|
2021-02-26 03:58:33 +00:00
|
|
|
var polyfill = callBind.apply(getPolyfill());
|
2020-08-25 23:57:08 +00:00
|
|
|
var shim = require('./shim');
|
|
|
|
|
|
|
|
var $slice = callBound('Array.prototype.slice');
|
|
|
|
|
|
|
|
/* eslint-disable no-unused-vars */
|
2021-02-26 03:58:33 +00:00
|
|
|
var boundShim = function includes(array, searchElement) {
|
2020-08-25 23:57:08 +00:00
|
|
|
/* eslint-enable no-unused-vars */
|
|
|
|
RequireObjectCoercible(array);
|
2021-02-26 03:58:33 +00:00
|
|
|
return polyfill(array, $slice(arguments, 1));
|
2020-08-25 23:57:08 +00:00
|
|
|
};
|
2021-02-26 03:58:33 +00:00
|
|
|
define(boundShim, {
|
2020-08-25 23:57:08 +00:00
|
|
|
getPolyfill: getPolyfill,
|
|
|
|
implementation: implementation,
|
|
|
|
shim: shim
|
|
|
|
});
|
|
|
|
|
2021-02-26 03:58:33 +00:00
|
|
|
module.exports = boundShim;
|