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

port-numbers

Package Overview
Dependencies
Maintainers
1
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

port-numbers

Get information on network port numbers and services, based on IANA's public listing

  • 2.0.16
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.9K
increased by36.26%
Maintainers
1
Weekly downloads
 
Created
Source

port-numbers

Get information on network port numbers and services, based on IANA's public listing.

Installation

$ npm install --save port-numbers

Example

var pn = require("port-numbers");

pn.getService(80);
//=> { name: 'http', description: 'World Wide Web HTTP' }
pn.getService(3306);
//=> { name: 'mysql', description: 'MySQL' }
pn.getService(123, "udp");

pn.getPort('redis');
//=> { port: '6379', protocol: 'tcp', description: 'An advanced key-value cache and store' }
pn.getPort("postgresql");
//=> { port: '5432', protocol: 'tcp', description: 'PostgreSQL Database' }
pn.getPort('ntp', 'udp');
//=> { port: 123, protocol: 'udp', description: 'Network Time Protocol' }

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

Keywords

FAQs

Package last updated on 06 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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