Skip to content

Commit

Permalink
don't use test.bind
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hayes committed Aug 12, 2015
1 parent 1976b52 commit a660d60
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var through = require('through');
var resumer = require('resumer');
var inspect = require('object-inspect');
var hasOwn = Object.prototype.hasOwnProperty;
var invalidYaml = RegExp.prototype.test.bind(/\:|\-|\?/);
var yamlIndicators = /\:|\-|\?/;
var nextTick = typeof setImmediate !== 'undefined'
? setImmediate
: process.nextTick
Expand Down Expand Up @@ -188,3 +188,7 @@ function getNextTest (results) {
function has (obj, prop) {
return hasOwn.call(obj, prop);
}

function invalidYaml (str) {
return yamlIndicators.test(str);
}

0 comments on commit a660d60

Please sign in to comment.