Function isIpv4

  • 检查是否为 ipv4 string

    Parameters

    • value: string

      字符串值

    Returns boolean

    isIpv4('127.0.0.1'); /// true
    isIpv4('255.255.255.0'); /// true
    isIpv4('255.255.255.2555'); /// false
    isIpv4('255.255.255.2555.255'); /// false