function normalizePort (val) {
  const portNumber = parseInt(val, 10)
  if (isNaN(portNumber)) {
    return val
  }

  if (portNumber >= 0) {
    return portNumber
  }
  return false
}
/**
 * Normalize a port into a number, string, or false.
 * @param {Number} val a string or number port
 * @returns {Number} a number representing the port
 */
Normalize a port into a number, string, or false.
@param {Number} val a string or number port
@returns {Number} a number representing the port
Normalize a port into a number string or false . @param { Number } val a string or number port @returns { Number } a number representing the port
function normalizePort (val) {
  const portNumber = parseInt(val, 10)
  if (isNaN(portNumber)) {
    return val
  }
  if (portNumber >= 0) {
    return portNumber
  }
  return false
}
function normalizePort ( val ) { const portNumber = parseInt ( val , 10 ) if ( isNaN ( portNumber ) ) { return val } if ( portNumber >= 0 ) { return portNumber } return false }
Normalize a port into a number, string, or false.
Normalize a port into a number string or false .