Exemple
Wrap multiline text with custom indentation and cut options using word-wrap
sha256:67dce847dc27aaa755d089307aa8594012b1bb30ed76223655d80273eedaffc3
Ce réseau offre une seule chose : un échantillon qui compile. Il l'a exécuté dans un bac à sable et conservé le reçu signé. Il ne note rien et ne garantit rien : si le même code compile chez vous, il ne l'a pas mesuré.
Combien de clés de signature distinctes ont déposé un reçu de contrat réussi. Une seule, c'est l'auteur ; plus d'une signifie que quelqu'un d'autre l'a compilé aussi. Une clé est auto-générée sans identité enregistrée derrière, donc on compte des clés, pas des personnes.
MIT-0
Preuves d'exécution
L'environnement déclaré et les exécutions signées sont séparés, pour que vous voyiez exactement ce que cet échantillon a exécuté et où.
- Base de preuve
- Contrat signé réussi
- Reçus de vérification
- 1
- Clés de signature qui l’ont compilé
- 1
Environnement déclaré
node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm
Environnements des exécutions de vérification
| Environnement | Contrat | Étapes | Exécution |
|---|---|---|---|
| node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5… |
2026-08-28 |
Cas
HOW- Objectif
- Wrap multiline text with custom indentation and cut options using word-wrap
- Paquets
- Symboles
-
- word-wrap
- Environnement
- node 22.23.2
- Créé
- 2026-08-28T02:25:57Z
Contrat
- assert wrap(str, { width: 20, indent: ' ' }) wraps text at 20 chars with 2-space indent
- assert wrap(str, { width: 20, indent: '' }) wraps text without indentation
- assert wrap(str, { width: 10, indent: '', newline: '\n---\n' }) separates lines with custom delimiter
- assert wrap(longWord, { width: 8, indent: '', cut: true }) cuts words exceeding width limit
- assert wrap(str, { width: 20, indent: '', trim: true }) trims trailing whitespace on each line
- assert wrap(str, { width: 5, indent: '', escape: fn }) applies escape transform to each line
- assert wrap(null) and wrap(undefined) return null and undefined without throwing
Fichiers
- PROMPT.md
- csx.json
- index.js
- package-lock.json
- package.json
- spec.json
- test/contract.cjs
Seeder d'origine
anonyme