diff --git a/package.json b/package.json index a408809..94efedb 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,6 @@ "eslint": "^6.8.0", "evalmd": "^0.0.19", "foreach": "^2.0.5", - "function-bind": "^1.1.1", "functions-have-names": "^1.2.1", "has-strict-mode": "^1.0.0", "indexof": "^0.0.1", diff --git a/test/implementation.js b/test/implementation.js index 894cf1e..a0a09fa 100644 --- a/test/implementation.js +++ b/test/implementation.js @@ -1,5 +1,5 @@ var every = require('../implementation'); -var bind = require('function-bind'); +var callBind = require('es-abstract/helpers/callBind'); var test = require('tape'); var runTests = require('./tests'); @@ -7,8 +7,8 @@ var hasStrictMode = require('has-strict-mode')(); test('as a function', function (t) { t.test('bad array/this value', function (st) { - st['throws'](bind.call(every, null, undefined, 'a'), TypeError, 'undefined is not an object'); - st['throws'](bind.call(every, null, null, 'a'), TypeError, 'null is not an object'); + st['throws'](callBind(every, null, undefined, 'a'), TypeError, 'undefined is not an object'); + st['throws'](callBind(every, null, null, 'a'), TypeError, 'null is not an object'); st.end(); }); @@ -37,7 +37,7 @@ test('as a function', function (t) { st.end(); }); - runTests(bind.call(Function.call, every), t); + runTests(callBind(every), t); t.end(); }); diff --git a/test/index.js b/test/index.js index 7580f60..5a55dbb 100644 --- a/test/index.js +++ b/test/index.js @@ -1,14 +1,14 @@ 'use strict'; var every = require('../'); -var bind = require('function-bind'); +var callBind = require('es-abstract/helpers/callBind'); var test = require('tape'); var runTests = require('./tests'); test('as a function', function (t) { t.test('bad array/this value', function (st) { - st['throws'](bind.call(every, null, undefined, 'a'), TypeError, 'undefined is not an object'); - st['throws'](bind.call(every, null, null, 'a'), TypeError, 'null is not an object'); + st['throws'](callBind(every, null, undefined, 'a'), TypeError, 'undefined is not an object'); + st['throws'](callBind(every, null, null, 'a'), TypeError, 'null is not an object'); st.end(); }); diff --git a/test/shimmed.js b/test/shimmed.js index 9c1853c..d3cb5d8 100644 --- a/test/shimmed.js +++ b/test/shimmed.js @@ -2,7 +2,7 @@ require('../shim')(); var test = require('tape'); var defineProperties = require('define-properties'); -var bind = require('function-bind'); +var callBind = require('es-abstract/helpers/callBind'); var hasStrictMode = require('has-strict-mode')(); var isEnumerable = Object.prototype.propertyIsEnumerable; @@ -55,7 +55,7 @@ test('shimmed', function (t) { st.end(); }); - runTests(bind.call(Function.call, Array.prototype.every), t); + runTests(callBind(Array.prototype.every), t); t.end(); });