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 04da90b commit b19da31
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/results.js
Expand Up @@ -6,9 +6,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
12 changes: 6 additions & 6 deletions lib/test.js
Expand Up @@ -8,15 +8,15 @@ 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 is = require('object-is');
var isEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable);
var toLowerCase = bind.call(Function.call, String.prototype.toLowerCase);
var isProto = bind.call(Function.call, Object.prototype.isPrototypeOf);
var $test = bind.call(Function.call, RegExp.prototype.test);
var objectToString = bind.call(Function.call, Object.prototype.toString);
var isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var toLowerCase = callBound('String.prototype.toLowerCase');
var isProto = callBound('Object.prototype.isPrototypeOf');
var $test = callBound('RegExp.prototype.test');
var objectToString = callBound('Object.prototype.toString');

module.exports = Test;

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

0 comments on commit b19da31

Please sign in to comment.