port-numbers
Get information on network port numbers and services, based on IANA's public listing.
Usage
npm i port-numbers
const {getService, getPort} = require('port-numbers');
getService(6379);
getService(26257);
getService(123, 'udp');
getPort('redis');
getPort('cockroach');
getPort('ntp', 'udp');
API
getService(port[, protocol])
port
Number : the port to lookup. Required.protocol
String : the protocol. Default: tcp
.
getPort(service[, protocol])
service
String : the service to lookup. Required.protocol
String : the protocol. Default: tcp
.
© silverwind, distributed under BSD licence