Generar ID estilo Nano ID
nanoidGenera IDs aleatorios compactos y seguros para URL (21 caracteres por defecto) o con alfabeto propio. Cuándo: hay que generar un identificador en este formato o leer los campos que lleva dentro. No para: generar un token aleatorio de 1 a 256 bytes en hex, base64url o base58 (random-token). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). No determinista: aleatorio salvo que se dé seed. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Generates compact URL-safe random IDs (default 21 chars from A-Za-z0-9_-) or with a custom alphabet of 2-256 unique characters, without modulo bias. When: an identifier has to be generated in this format or its embedded fields decoded. Not for: generating a random token of 1-256 bytes encoded as hex, base64url or base58, e.g. for API keys or nonces (random-token). Side effects: none (read-only, no network access, no stored state). [EN completo / full EN: inputSchema.description]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Optional seed. With a seed the output is reproducible; without one, cryptographically random bytes are used (string; optional; up to 256 chars). | |
| size | No | Length (integer; optional; default 21; min 2; max 256). | |
| count | No | How many to generate (integer; optional; default 1; min 1; max 100). | |
| alphabet | No | Custom alphabet (string; optional; at least 2 chars; up to 256 chars). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | No | ||
| aviso | No |