Beispiel
ip-address 10.4.0: v6
Verifiziertes Beispiel für npm ip-address 10.4.0: v6. Der Vertrag lief auf node 22 · linux debian/x64 · docker und bestand: v6 exposes helpers namespace for…
sha256:e491799c0c07ee055c01ab16b4ad3bad3ce1435e31a585b10461f79c345a8fc4
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 1
- Signaturschlüssel, die es gebaut haben
- 1
Deklarierte Umgebung
node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| node 22 · linux debian/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22@sha256:8a34c4ab3ea2… |
2026-09-05 |
Fall
HOW- Ziel
- verify ip-address.v6 in pkg:npm/ip-address@10.4.0
- Pakete
- Symbole
-
- ip-address.v6
- Umgebung
- node 22.23.2
- Erstellt
- 2026-09-05T22:23:03Z
Contract
- v6 exposes helpers namespace for IPv6 address manipulation and HTML formatting
- v6.helpers.escapeHtml converts special characters to corresponding HTML entities
- v6.helpers.spanAllZeroes wraps every zero sequence in a span with the zero class
- v6.helpers.spanAll wraps each character in a digit span with value and indexed position classes
- v6.helpers.spanLeadingZeroes wraps leading zero sequences of each IPv6 group in a span with the zero class
- v6.helpers.simpleGroup splits an IPv6 address string into an array of hover-group spans with offset indices
Dateien
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.cjs
Quelltext
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify ip-address.v6 in pkg:npm/ip-address@10.4.0
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/ip-address@10.4.0
Demonstrate these symbols/APIs:
- ip-address.v6
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:f7d5bacb3f0105e1dbaf6e31015ed19b7801c3c8c0b785ad069e2dcd0b28595e","constraints":{"executionContext":"node"},"contract":["v6 exposes helpers namespace for IPv6 address manipulation and HTML formatting","v6.helpers.escapeHtml converts special characters to corresponding HTML entities","v6.helpers.spanAllZeroes wraps every zero sequence in a span with the zero class","v6.helpers.spanAll wraps each character in a digit span with value and indexed position classes","v6.helpers.spanLeadingZeroes wraps leading zero sequences of each IPv6 group in a span with the zero class","v6.helpers.simpleGroup splits an IPv6 address string into an array of hover-group spans with offset indices"],"goal":"verify ip-address.v6 in pkg:npm/ip-address@10.4.0","kind":"HOW","packages":["pkg:npm/ip-address@10.4.0"],"schemaVersion":1,"symbols":["ip-address.v6"]},"contractCommand":["node","test/contract.cjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","executionContext":"node","language":"javascript","libc":"glibc","libcVersion":"2.39","moduleSystem":"cjs","os":"linux","osVersionBucket":"24","packageManager":"npm","packageManagerVersion":"10.9.8","runtime":"node","runtimeVersion":"22.23.2","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/ip-address@10.4.0"],"schemaVersion":1,"subject":"pkg:npm/ip-address@10.4.0","symbols":["ip-address.v6"],"verifierAdapter":"node-typescript@1"}
{
"name": "ip-address-sample",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ip-address-sample",
"version": "1.0.0",
"dependencies": {
"ip-address": "10.4.0"
}
},
"node_modules/ip-address": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.4.0.tgz",
"integrity": "sha512-oSK96Grm3aP6OrS263xVxbNDGVL7rzBtYdpGqlDG8iQdoenDoTs/nkki+DflYbAEE8Xl6o5YxhxlrKvI3nqKXQ==",
"license": "MIT",
"engines": {
"node": ">= 12"
}
}
}
}
{
"name": "ip-address-sample",
"version": "1.0.0",
"private": true,
"description": "Verification sample for ip-address 10.4.0",
"dependencies": {
"ip-address": "10.4.0"
}
}
{
"schemaVersion": 1,
"goal": "verify ip-address.v6 in pkg:npm/ip-address@10.4.0",
"kind": "HOW",
"packages": [
"pkg:npm/ip-address@10.4.0"
],
"symbols": [
"ip-address.v6"
]
}
const assert = require("node:assert/strict");
const { v6 } = require("ip-address");
// 1. v6 exposes helpers namespace for IPv6 address manipulation and HTML formatting
assert.ok(v6, "v6 namespace must be exported");
assert.ok(v6.helpers, "v6 must contain helpers object");
assert.equal(typeof v6.helpers.escapeHtml, "function");
assert.equal(typeof v6.helpers.spanAllZeroes, "function");
assert.equal(typeof v6.helpers.spanAll, "function");
assert.equal(typeof v6.helpers.spanLeadingZeroes, "function");
assert.equal(typeof v6.helpers.simpleGroup, "function");
// 2. v6.helpers.escapeHtml converts special characters to corresponding HTML entities
assert.equal(v6.helpers.escapeHtml('&<>"\''), '&<>"'');
assert.equal(v6.helpers.escapeHtml("2001:db8::1"), "2001:db8::1");
assert.equal(v6.helpers.escapeHtml('<script>alert("xss")</script>'), '<script>alert("xss")</script>');
// 3. v6.helpers.spanAllZeroes wraps every zero sequence in a span with the zero class
assert.equal(v6.helpers.spanAllZeroes("00ab0cd"), '<span class="zero">00</span>ab<span class="zero">0</span>cd');
assert.equal(v6.helpers.spanAllZeroes("1234"), "1234");
assert.equal(v6.helpers.spanAllZeroes("0000"), '<span class="zero">0000</span>');
// 4. v6.helpers.spanAll wraps each character in a digit span with value and indexed position classes
const spanned = v6.helpers.spanAll("2001", 0);
assert.equal(
spanned,
'<span class="digit value-2 position-0">2</span>' +
'<span class="digit value-0 position-1"><span class="zero">0</span></span>' +
'<span class="digit value-0 position-2"><span class="zero">0</span></span>' +
'<span class="digit value-1 position-3">1</span>'
);
const offsetSpanned = v6.helpers.spanAll("ab", 4);
assert.equal(
offsetSpanned,
'<span class="digit value-a position-4">a</span><span class="digit value-b position-5">b</span>'
);
// 5. v6.helpers.spanLeadingZeroes wraps leading zero sequences of each IPv6 group in a span with the zero class
assert.equal(
v6.helpers.spanLeadingZeroes("0001:0db8:0000:002a"),
'<span class="zero">000</span>1:<span class="zero">0</span>db8:<span class="zero">0000</span>:<span class="zero">00</span>2a'
);
assert.equal(
v6.helpers.spanLeadingZeroes("2001:db8::1"),
"2001:db8::1"
);
// 6. v6.helpers.simpleGroup splits an IPv6 address string into an array of hover-group spans with offset indices
const grouped = v6.helpers.simpleGroup("2001:0db8:85a3", 0);
assert.deepEqual(grouped, [
'<span class="hover-group group-0">2001</span>',
'<span class="hover-group group-1"><span class="zero">0</span>db8</span>',
'<span class="hover-group group-2">85a3</span>'
]);
const offsetGrouped = v6.helpers.simpleGroup("fe80:0001", 4);
assert.deepEqual(offsetGrouped, [
'<span class="hover-group group-4">fe80</span>',
'<span class="hover-group group-5"><span class="zero">000</span>1</span>'
]);
console.log("Contract verified successfully.");
Ursprungs-Seeder
anonym