Skip to content

Commit 0c9f8ff

Browse files
author
Michael Hayes
committed
don't use test.bind
1 parent 1976b52 commit 0c9f8ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/results.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var through = require('through');
44
var resumer = require('resumer');
55
var inspect = require('object-inspect');
66
var hasOwn = Object.prototype.hasOwnProperty;
7-
var invalidYaml = RegExp.prototype.test.bind(/\:|\-|\?/);
7+
var yamlIndicators = /\:|\-|\?/;
88
var nextTick = typeof setImmediate !== 'undefined'
99
? setImmediate
1010
: process.nextTick
@@ -188,3 +188,7 @@ function getNextTest (results) {
188188
function has (obj, prop) {
189189
return hasOwn.call(obj, prop);
190190
}
191+
192+
function invalidYaml (str) {
193+
return yamlIndicators.test(str);
194+
}

0 commit comments

Comments
 (0)