Decodificar KSUID
ksuid-decodeDecodifica un KSUID de 27 caracteres en fecha y payload de 128 bits. Cuándo: hay que generar un identificador en este formato o leer los campos que lleva dentro. No para: validar un ULID y extraer su marca de tiempo y la parte aleatoria (ulid-decode). 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: Decodes a 27-char base62 KSUID into its timestamp (epoch 1400000000) and 128-bit payload. When: an identifier has to be generated in this format or its embedded fields decoded. Not for: validating a ULID and extracting its timestamp (ulid-decode). 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 |
|---|---|---|---|
| ksuid | Yes | KSUID (string; required; up to 40 chars). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | No | ||
| timestamp | No | ||
| payload_hex | No | ||
| timestamp_s | No |