1.0.0 • Published 3 years ago

async-portscanner v1.0.0

Weekly downloads
-
License
WTFPL
Repository
github
Last release
3 years ago

portscanner

Install

npm install Asyncportscanner

Usage

A brief example:

import {findAPortInUse, findAPortNotInUse} from './index.js';

findAPortInUse({startPort: 2999, endPort: 3002, host: '127.0.0.1'})
  .then(data=>{
    const {error, port} = data;
    console.log(error, port);
  });

findAPortNotInUse({portList: [2999, 3000, 3001]})
  .then(data=>{
    const {error, port} = data;
    console.log(error, port);
  })

Test

npm test
1.0.0

3 years ago