get-multiple-ports
v2.0.0
Published
attain several available ports
Downloads
4
Maintainers
Readme
get-multiple-ports
Get a number of (optionally named) available ports.
usage
const ports = require(`get-multiple-ports`)
ports()
.then(console.log)
.catch(console.error)
// [ 58021 ]
ports(3)
.then(console.log)
.catch(console.error)
// [ 57883, 57884, 57885 ]
ports(`protostar`)
.then(console.log)
.catch(console.error)
// { protostar: 58016 }
ports([ `ControlPort`, `SocksPort` ])
.then(console.log)
.catch(console.error)
// { ControlPort: 57889, SocksPort: 57890 }