This package has been deprecated

Author message:

This package is not pratical and never been used

id2port
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

id2port

Generates a port for usage according to the given string id.

Example

const id2port = require("id2port").default;

var ports = id2port("abc");

console.log(ports.next().value); // 22156
console.log(ports.next().value); // 22157

Details

This function will travel the ports from 1 - 65535 according to the given id as long as you continue calling next() until all ports are viewed, but it will skip some well-known ports as module well-known-ports suggests.

Notes

This module doesn't detect if the returning port is being used or not, you must do detect it yourself.

Readme

Keywords

Package Sidebar

Install

npm i id2port

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

3.83 kB

Total Files

7

Last publish

Collaborators

  • ayonli