Skip to content

Commit 967b73f

Browse files
committed
[Refactor] use call-bind/callBound instead of function-bind directly
1 parent d81f9f6 commit 967b73f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

lib/results.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ var inherits = require('inherits');
44
var through = require('through');
55
var resumer = require('resumer');
66
var inspect = require('object-inspect');
7-
var bind = require('function-bind');
7+
var callBound = require('call-bind/callBound');
88
var has = require('has');
9-
var regexpTest = bind.call(Function.call, RegExp.prototype.test);
9+
var regexpTest = callBound('RegExp.prototype.test');
1010
var yamlIndicators = /:|-|\?/;
1111
var nextTick = typeof setImmediate !== 'undefined'
1212
? setImmediate

lib/test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ var EventEmitter = require('events').EventEmitter;
88
var has = require('has');
99
var isRegExp = require('is-regex');
1010
var trim = require('string.prototype.trim');
11-
var bind = require('function-bind');
11+
var callBound = require('call-bind/callBound');
1212
var forEach = require('for-each');
1313
var inspect = require('object-inspect');
14-
var isEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable);
15-
var toLowerCase = bind.call(Function.call, String.prototype.toLowerCase);
16-
var $test = bind.call(Function.call, RegExp.prototype.test);
14+
var isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
15+
var toLowerCase = callBound('String.prototype.toLowerCase');
16+
var $test = callBound('RegExp.prototype.test');
1717

1818
module.exports = Test;
1919

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"test": "test"
1010
},
1111
"dependencies": {
12+
"call-bind": "~1.0.2",
1213
"deep-equal": "~1.1.1",
1314
"defined": "~1.0.0",
1415
"dotignore": "~0.1.2",
1516
"for-each": "~0.3.3",
16-
"function-bind": "~1.1.1",
1717
"glob": "~7.1.7",
1818
"has": "~1.0.3",
1919
"inherits": "~2.0.4",

0 commit comments

Comments
 (0)