Skip to content

Commit

Permalink
[Refactor] use call-bind/callBound instead of function-bind directly
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 4, 2021
1 parent d81f9f6 commit 967b73f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/results.js
Expand Up @@ -4,9 +4,9 @@ var inherits = require('inherits');
var through = require('through');
var resumer = require('resumer');
var inspect = require('object-inspect');
var bind = require('function-bind');
var callBound = require('call-bind/callBound');
var has = require('has');
var regexpTest = bind.call(Function.call, RegExp.prototype.test);
var regexpTest = callBound('RegExp.prototype.test');
var yamlIndicators = /:|-|\?/;
var nextTick = typeof setImmediate !== 'undefined'
? setImmediate
Expand Down
8 changes: 4 additions & 4 deletions lib/test.js
Expand Up @@ -8,12 +8,12 @@ var EventEmitter = require('events').EventEmitter;
var has = require('has');
var isRegExp = require('is-regex');
var trim = require('string.prototype.trim');
var bind = require('function-bind');
var callBound = require('call-bind/callBound');
var forEach = require('for-each');
var inspect = require('object-inspect');
var isEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable);
var toLowerCase = bind.call(Function.call, String.prototype.toLowerCase);
var $test = bind.call(Function.call, RegExp.prototype.test);
var isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var toLowerCase = callBound('String.prototype.toLowerCase');
var $test = callBound('RegExp.prototype.test');

module.exports = Test;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -9,11 +9,11 @@
"test": "test"
},
"dependencies": {
"call-bind": "~1.0.2",
"deep-equal": "~1.1.1",
"defined": "~1.0.0",
"dotignore": "~0.1.2",
"for-each": "~0.3.3",
"function-bind": "~1.1.1",
"glob": "~7.1.7",
"has": "~1.0.3",
"inherits": "~2.0.4",
Expand Down

0 comments on commit 967b73f

Please sign in to comment.