Skip to content

Commit

Permalink
[Robustness] use callBind.apply
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Oct 2, 2021
1 parent f60bf0a commit 3c76337
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Expand Up @@ -2,19 +2,20 @@

var define = require('define-properties');
var RequireObjectCoercible = require('es-abstract/2021/RequireObjectCoercible');
var callBind = require('call-bind');
var callBound = require('call-bind/callBound');

var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var polyfill = getPolyfill();
var polyfill = callBind.apply(getPolyfill());
var shim = require('./shim');

var $slice = callBound('Array.prototype.slice');

// eslint-disable-next-line no-unused-vars
var boundEveryShim = function some(array, callbackfn) {
RequireObjectCoercible(array);
return polyfill.apply(array, $slice(arguments, 1));
return polyfill(array, $slice(arguments, 1));
};
define(boundEveryShim, {
getPolyfill: getPolyfill,
Expand Down

0 comments on commit 3c76337

Please sign in to comment.