Hash a value to a valid port
npm install hash-to-port
var toPort = require('hash-to-port')
console.log(toPort('example.com')) // returns 22019
Hash the given value to a valid port (>= from <= to
).
The same value will always hash to the same port but note that two different values might hash to the same port as well
value
from
<?number> (default:1024
)to
<?number> (default:65535
)
MIT