Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/silverwind/port-numbers
npm module that holds information on network port numbers based on IANA's data.
https://github.com/silverwind/port-numbers
iana network nodejs port-numbers protocol
Last synced: 27 days ago
JSON representation
npm module that holds information on network port numbers based on IANA's data.
- Host: GitHub
- URL: https://github.com/silverwind/port-numbers
- Owner: silverwind
- Created: 2015-01-24T21:27:35.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-04-13T19:10:02.000Z (8 months ago)
- Last Synced: 2024-04-14T09:49:11.461Z (8 months ago)
- Topics: iana, network, nodejs, port-numbers, protocol
- Language: JavaScript
- Homepage:
- Size: 3.31 MB
- Stars: 30
- Watchers: 3
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# port-numbers
[![](https://img.shields.io/npm/v/port-numbers.svg?style=flat)](https://www.npmjs.org/package/port-numbers) [![](https://img.shields.io/npm/dm/port-numbers.svg)](https://www.npmjs.org/package/port-numbers) [![](https://packagephobia.com/badge?p=port-numbers)](https://packagephobia.com/result?p=port-numbers)npm module that holds information on network port numbers based on [IANA's data](http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml).
### Usage
Depending on your environment you may need to use [import attributes](https://github.com/tc39/proposal-import-attributes), [import assertions](https://nodejs.org/api/esm.html#import-assertions) or [nothing at all](https://bun.sh/guides/runtime/import-json).
```js
import ports from "port-numbers" with {type: "json"};ports["6379/tcp"];
// ["redis", "An advanced key-value cache and store"]
ports["123/udp"];
// ["ntp", "Network Time Protocol"]
```### API
The export is a JSON object in with `port/proto` as key and `[name, description]` as value.
```json
{
"6379/tcp": [
"redis",
"An advanced key-value cache and store"
]
}
```© [silverwind](https://github.com/silverwind), distributed under BSD licence