ts-phonenumber - v2.0.0
    Preparing search index...

    Function getType

    • Determines the type of a phone number. Only LANDLINE, MOBILE, and VOIP are returned as valid types. All other types (toll-free, premium, etc.) return INVALID.

      Parameters

      • input: string

        The phone number string to classify

      • options: ParseOptions = {}

        Parsing options including default region

      Returns Promise<PhoneNumberType>

      The phone number type (LANDLINE, MOBILE, VOIP, or INVALID)