Dígito de control GS1
gtin-check-digitCalcula el dígito de control GS1 (mod 10) para un GTIN/EAN/UPC/SSCC. Cuándo: hay que verificar sin conexión el formato y el dígito de control de un identificador antes de usarlo. No para: validar códigos de barras EAN-8, UPC-A, EAN-13 y GTIN-14 (gtin-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: Computes the GS1 mod-10 check digit for a GTIN/EAN/UPC/SSCC body of 7-17 digits and returns the full code. When: an identifier's format and check digit have to be verified offline before it is used. Not for: validating GTIN-8 (gtin-validate). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Digits without check digit (string; required; pattern ^\d{7,17}$). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | ||
| check_digit | No |