portscanner
Advanced tools
Comparing version 2.1.1 to 2.2.0
@@ -153,3 +153,3 @@ var net = require('net') | ||
function findAPortWithStatus (status) { | ||
var params, startPort, endPort, portList, host, callback | ||
var params, startPort, endPort, portList, host, opts, callback | ||
@@ -168,2 +168,4 @@ params = [].slice.call(arguments, 1) | ||
host = params[1] | ||
} else if (typeof params[1] === 'object') { | ||
opts = params[1] | ||
} else if (isNumberLike(params[1])) { | ||
@@ -175,2 +177,4 @@ endPort = parseInt(params[1], 10) | ||
host = params[2] | ||
} else if (typeof params[2] === 'object') { | ||
opts = params[2] | ||
} else if (typeof params[2] === 'function') { | ||
@@ -186,2 +190,6 @@ callback = params[2] | ||
opts = opts || {} | ||
host = host || opts.host | ||
if (startPort && endPort && endPort < startPort) { | ||
@@ -208,3 +216,3 @@ // WARNING: endPort less than startPort. Using endPort as startPort & vice versa. | ||
var checkNextPort = function (callback) { | ||
checkPortStatus(port, host, function (error, statusOfPort) { | ||
checkPortStatus(port, host, opts, function (error, statusOfPort) { | ||
numberOfPortsChecked++ | ||
@@ -211,0 +219,0 @@ if (statusOfPort === status) { |
@@ -5,2 +5,3 @@ { | ||
"scripts": { | ||
"coverage": "nyc npm run test", | ||
"test": "ava", | ||
@@ -16,3 +17,3 @@ "lint": "standard" | ||
], | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"preferGlobal": false, | ||
@@ -36,3 +37,3 @@ "homepage": "https://github.com/baalexander/node-portscanner", | ||
"dependencies": { | ||
"async": "1.5.2", | ||
"async": "^2.6.0", | ||
"is-number-like": "^1.0.3" | ||
@@ -42,2 +43,3 @@ }, | ||
"ava": "^0.4.2", | ||
"nyc": "^11.3.0", | ||
"eslint": "^3.10.2", | ||
@@ -44,0 +46,0 @@ "eslint-config-standard": "^6.2.1", |
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
23061
7
234
5
+ Addedasync@2.6.4(transitive)
+ Addedlodash@4.17.21(transitive)
- Removedasync@1.5.2(transitive)
Updatedasync@^2.6.0