Package Exports
- port-numbers
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (port-numbers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Get the information on network port numbers, based on IANA's public listing
###Installation
$ npm install --save port-numbers###Example
var pn = require("port-numbers");
pn(80, function(err, result) {
console.log(result);
// => { name: 'http', description: 'World Wide Web HTTP' }
});
pn(53, "udp", function(err, result) {
console.log(result);
// => { name: 'domain', description: 'Domain Name Server' }
});API
pn(port, [protocol], [callback])
portnumber : the port to lookup. Required.protocolstring : the protocol. Default:tcp.callbackfunction : the callback receiveserrand an object containingnameanddescription.
© 2015 silverwind, distributed under BSD licence