We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ljharb
Learn more about funding links in repositories.
Report abuse
test
exec
1 parent b2d547a commit 330f8d5Copy full SHA for 330f8d5
lib/results.js
@@ -8,7 +8,7 @@ var resumer = require('resumer');
8
var inspect = require('object-inspect');
9
var callBound = require('call-bind/callBound');
10
var has = require('has');
11
-var regexpTest = callBound('RegExp.prototype.test');
+var $exec = callBound('RegExp.prototype.exec');
12
var $split = callBound('String.prototype.split');
13
var $replace = callBound('String.prototype.replace');
14
var $shift = callBound('Array.prototype.shift');
@@ -226,5 +226,5 @@ function getNextTest(results) {
226
}
227
228
function invalidYaml(str) {
229
- return regexpTest(yamlIndicators, str);
+ return $exec(yamlIndicators, str) !== null;
230
0 commit comments