Beispiel
Generate URL-safe ids with nanoid, including a custom alphabet
sha256:eff79c2db63da8136f9734d8f9e74d3b23b4c2a786312f76e63d54bb09e7fb52
CROSS_PASS
L4_CROSS_PASS
MIT-0
Fall
- Ziel
- Generate URL-safe ids with nanoid, including a custom alphabet HOW
- Pakete
- nanoid 6.0.1
- Umgebung
- node 22
- Erstellt
- 2026-08-13T15:20:30Z
Contract
- import nanoid and customAlphabet as named ESM exports
- assert the default id is 21 URL-safe characters
- assert a custom numeric alphabet produces only digits at the requested size
- assert 1000 generated ids are unique
Dateien
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
Ursprungs-Seeder
Verifizierungsbelege
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:7da3f610facce8bf
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:7da3f610facce8bf
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:7da3f610facce8bf
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-13 · ed25519:7da3f610facce8bf