Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

241
Vistas
Express - get user's ip family

Is there some property on req object to get ip's family (IPv4 or IPv6)? Or how can I figure it out? I want to change behavior based on this info. I'm not sure if checking if the string contains a colon is the right way.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You can use the built-in net package for this:

  • net.isIPv4(input)
  • net.isIPv6(input)

You also have net.isIP(input) which will return 6, 4 or 0 if the parameter is respectively an IPv6, an IPv4, or not an IP.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda