function normalizePort(val) {
    const port = parseInt(val, 10);

    if (isNaN(port)) return val;
    if (port >= 0) return port;

    return false;
}
// Normalize a port into a number, string, or false
Normalize a port into a number, string, or false
Normalize a port into a number string or false
function normalizePort(val) {
    const port = parseInt(val, 10);
    if (isNaN(port)) return val;
    if (port >= 0) return port;
    return false;
}
function normalizePort ( val ) { const port = parseInt ( val , 10 ) ; if ( isNaN ( port ) ) return val ; if ( port >= 0 ) return port ; return false ; }
Normalize a port into a number, string, or false
Normalize a port into a number string or false