Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openport

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openport - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json

@@ -7,3 +7,3 @@ {

"homepage": "https://github.com/nearinfinity/node-openport",
"version": "0.0.1",
"version": "0.0.2",
"engines": { "node" : ">=0.6.0" },

@@ -10,0 +10,0 @@ "maintainers": [

@@ -35,3 +35,4 @@ # openport

startingPort: 1024,
endingPort: 2000
endingPort: 2000,
avoid: [ 1025, 1500 ]
}

@@ -38,0 +39,0 @@ function(err, port) {

@@ -19,2 +19,44 @@ 'use strict';

'find a port not in the avoid list': function (test) {
op.find(
{
ports: [ 1024, 1025, 1026, 1027 ],
avoid: [ 1025, 1026 ],
count: 2
},
function (err, ports) {
test.ok(!err);
test.deepEqual([1024, 1027], ports);
test.done();
});
},
'find a port not in the avoid list outer case': function (test) {
op.find(
{
ports: [ 1024, 1025, 1026, 1027 ],
avoid: [ '1024', '1027' ],
count: 2
},
function (err, ports) {
test.ok(!err);
test.deepEqual([1025, 1026], ports);
test.done();
});
},
'find a port not in the avoid list starting port': function (test) {
op.find(
{
startingPort: 1024,
avoid: [ 1024, 1026 ],
count: 2
},
function (err, ports) {
test.ok(!err);
test.deepEqual([1025, 1027], ports);
test.done();
});
},
'port that requires sudo': function (test) {

@@ -21,0 +63,0 @@ op.find(

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc