Formatear número por país
number-format-localeFormatea un número según el idioma/país con Intl (decimal, porcentaje, compacto, científico). Cuándo: un resultado numérico tiene que ser exacto o reproducible y no estimado. No para: redondear a N decimales con aritmética decimal exacta y modos half_up, half_even (round-number). 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: Formats a number for a locale with Intl.NumberFormat: decimal, percent, compact (1.2K / 1,2 mil), scientific or engineering notation, with min/max fraction digits and grouping. When: a numeric result has to be exact or reproducible instead of estimated. Not for: rounding a number to N decimal places using exact decimal arithmetic (round-number). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. [EN completo / full EN: inputSchema.description]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | Style (optional; one of: decimal, percent, compact, scientific, engineering; default "decimal"). | decimal |
| value | Yes | Number (number; required). | |
| locale | No | BCP 47 locale (string; optional; default "en-US"; up to 35 chars; pattern ^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$). | en-US |
| grouping | No | Use grouping separators (boolean; optional; default true). | |
| max_fraction_digits | No | Max fraction digits (integer; optional; min 0; max 20). | |
| min_fraction_digits | No | Min fraction digits (integer; optional; min 0; max 20). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| locale | No | ||
| formatted | No |