Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

Const isIp

  • isIp(val: string): boolean
  • Checks for a valid IPv4 or IPv6 address.

    example

    isIp('2001:db8::ff00:42:8329'); // true isIp('127.0.0.1'); // true isIp('1.0.287.99'); // false isIp('2001::::42:8329'); // false isIp(true); // false

    Parameters

    • val: string

      The value to check.

    Returns boolean

    Whether the value is an IPv4 or IPv6 address.

Legend

  • Function

Generated using TypeDoc