Analizar teléfono de LatAm, EE. UU. o España
phone-parseAnaliza un teléfono de CO, MX, BR, AR, CL, PE, EC, EE. UU. o España: país, tipo cuando el plan lo indica (móvil, fijo, gratuito…), E.164 y formatos nacional e internacional. Solo sintaxis. Cuándo: hay que verificar sin conexión el formato y el dígito de control de un identificador antes de usarlo. No para: normalizar un teléfono a E.164 e identifica el código de país (phone-e164-validate). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Parses a phone number of Colombia, Mexico, Brazil, Argentina, Chile, Peru, Ecuador, the US (NANP) or Spain into country, type when the numbering plan tells it (mobile, fixed, toll-free…), E.164 and national and international formats. Syntax only; it does not check the line exists. [EN completo / full EN: inputSchema.description]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes | Phone number, with + and country code or national (string; required; up to 40 chars). | |
| default_country | No | Country for national numbers (optional; one of: CO, MX, BR, AR, CL, PE, EC, US, ES). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| e164 | No | ||
| note | No | ||
| type | No | ||
| valid | No | ||
| errors | No | ||
| region | No | ||
| source | No | ||
| country | No | ||
| warnings | No | ||
| area_code | No | ||
| country_code | No | ||
| national_format | No | ||
| national_number | No | ||
| international_format | No |