Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

Const isDomain

  • isDomain(val: string): boolean
  • Checks for a valid domain name.

    see

    https://github.com/johnotander/domain-regex

    example

    isDomain('example.com'); // true isDomain('subdomain.example.com'); // true isDomain('sub.domain.example.website'); // true isDomain('not_a_domain'); // false isDomain(1234); // false isDomain(true); // false

    Parameters

    • val: string

      The value to check.

    Returns boolean

    Whether the value is a valid domain name.

Legend

  • Function

Generated using TypeDoc