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

    Function getRegionsForCode

    • Gets all region codes that share a country calling code.

      Parameters

      • countryCode: number

        The country calling code (e.g., 1, 44)

      Returns Promise<readonly string[] | undefined>

      Array of region codes or undefined if unknown

      await getRegionsForCode(1)   // ["US", "CA", "PR", ...]
      await getRegionsForCode(44) // ["GB", "GG", "IM", "JE"]
      await getRegionsForCode(49) // ["DE"]