curlrequest
Advanced tools
Comparing version 0.5.5 to 0.5.6
14
index.js
@@ -288,5 +288,6 @@ var util = require('util') | ||
} | ||
var str; | ||
for (var i = 0, l = require_str.length; i < l; i++) { | ||
if ((util.isRegExp(require_str[i]) && require_str[i].test(stdout)) | ||
|| stdout.indexOf(require_str[i]) !== -1) { | ||
str = require_str[i]; | ||
if ((util.isRegExp(str) && str.test(stdout)) || stdout.indexOf(str) !== -1) { | ||
valid = true; | ||
@@ -297,3 +298,3 @@ break; | ||
if (!valid) { | ||
err = 'response does not contain required string: ' + require_str[i]; | ||
err = 'response does not contain required string: ' + str; | ||
stdout = null | ||
@@ -309,5 +310,6 @@ } else if (!encoding) { | ||
} | ||
var str; | ||
for (var i = 0, l = require_not_str.length; i < l; i++) { | ||
if ((util.isRegExp(require_not_str[i]) && require_not_str[i].test(stdout)) | ||
|| stdout.indexOf(require_not_str[i]) !== -1) { | ||
str = require_not_str[i]; | ||
if ((util.isRegExp(str) && str.test(stdout)) || stdout.indexOf(str) !== -1) { | ||
valid = false; | ||
@@ -318,3 +320,3 @@ break; | ||
if (!valid) { | ||
err = 'response contains bad string: ' + require_not_str[i]; | ||
err = 'response contains bad string: ' + str; | ||
stdout = null | ||
@@ -321,0 +323,0 @@ } else if (!encoding) { |
{ "name" : "curlrequest", | ||
"description" : "A curl wrapper for node", | ||
"version" : "0.5.5", | ||
"version" : "0.5.6", | ||
"homepage" : "https://github.com/chriso/curlrequest", | ||
@@ -5,0 +5,0 @@ "author" : "Chris O'Hara <cohara87@gmail.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
505
26006