Beispiel
fill-range 7.1.1: fill-range
Verifiziertes Beispiel für npm fill-range 7.1.1: fill-range. Der Vertrag lief auf node 22 · linux debian/x64 · docker und bestand.
sha256:ae392d5816c600a656fcca041f30719787351a53cb764c7c39c9ed84e30e6590
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-02 |
Fall
HOW- Ziel
- verify fill-range in pkg:npm/fill-range@7.1.1
- Pakete
- Symbole
-
- fill-range
- Umgebung
- node 22.23.2
- Erstellt
- 2026-09-02T00:46:46Z
Contract
- fill expands numerical integer ranges in ascending and descending order
- fill expands numerical ranges with custom step increments
- fill expands alphabetical character ranges in ascending and descending order
- fill preserves zero-padding format when string inputs have leading zeros
- fill transforms output values using a custom transform function
- fill converts number ranges to string arrays when stringify option is enabled
- fill generates regex range patterns when toRegex option is enabled
- fill handles single-argument and invalid range options
Dateien
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
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 fill-range in pkg:npm/fill-range@7.1.1
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/fill-range@7.1.1
Demonstrate these symbols/APIs:
- fill-range
Constraints:
- executionContext: node
Required runtime conditions:
- ecosystem: npm
- language: javascript
- moduleSystem: cjs
- packageManager: npm@10.9.8
- runtime: node@22.23.2
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:c9bad71e17ac0ad3dcc480b2a4898fb369e9c84a07b66fed3e338791c7854a9b","constraints":{"executionContext":"node"},"contract":["fill expands numerical integer ranges in ascending and descending order","fill expands numerical ranges with custom step increments","fill expands alphabetical character ranges in ascending and descending order","fill preserves zero-padding format when string inputs have leading zeros","fill transforms output values using a custom transform function","fill converts number ranges to string arrays when stringify option is enabled","fill generates regex range patterns when toRegex option is enabled","fill handles single-argument and invalid range options"],"goal":"verify fill-range in pkg:npm/fill-range@7.1.1","kind":"HOW","packages":["pkg:npm/fill-range@7.1.1"],"schemaVersion":1,"symbols":["fill-range"]},"contractCommand":["node","test/contract.mjs"],"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/fill-range@7.1.1"],"schemaVersion":1,"subject":"pkg:npm/fill-range@7.1.1","symbols":["fill-range"],"verifierAdapter":"node-typescript@1"}
{
"name": "sample-fill-range",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-fill-range",
"version": "1.0.0",
"dependencies": {
"fill-range": "7.1.1"
}
},
"node_modules/fill-range": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"license": "MIT",
"dependencies": {
"to-regex-range": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"license": "MIT",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"license": "MIT",
"dependencies": {
"is-number": "^7.0.0"
},
"engines": {
"node": ">=8.0"
}
}
}
}
{
"name": "sample-fill-range",
"version": "1.0.0",
"private": true,
"dependencies": {
"fill-range": "7.1.1"
}
}
{
"schemaVersion": 1,
"goal": "verify fill-range in pkg:npm/fill-range@7.1.1",
"kind": "HOW",
"packages": [
"pkg:npm/fill-range@7.1.1"
],
"symbols": [
"fill-range"
],
"constraints": {
"executionContext": "node"
},
"runtimeConditions": {
"ecosystem": "npm",
"language": "javascript",
"moduleSystem": "cjs",
"packageManager": "npm@10.9.8",
"runtime": "node@22.23.2"
}
}
import assert from 'node:assert/strict';
import fill from 'fill-range';
// 1. fill expands numerical integer ranges in ascending and descending order
{
assert.deepEqual(fill(1, 5), [1, 2, 3, 4, 5]);
assert.deepEqual(fill(5, 1), [5, 4, 3, 2, 1]);
assert.deepEqual(fill(-2, 2), [-2, -1, 0, 1, 2]);
assert.deepEqual(fill(0, 0), [0]);
}
// 2. fill expands numerical ranges with custom step increments
{
assert.deepEqual(fill(1, 10, 2), [1, 3, 5, 7, 9]);
assert.deepEqual(fill(10, 1, 2), [10, 8, 6, 4, 2]);
assert.deepEqual(fill(1, 10, 3), [1, 4, 7, 10]);
assert.deepEqual(fill(0, 20, 5), [0, 5, 10, 15, 20]);
}
// 3. fill expands alphabetical character ranges in ascending and descending order
{
assert.deepEqual(fill('a', 'e'), ['a', 'b', 'c', 'd', 'e']);
assert.deepEqual(fill('e', 'a'), ['e', 'd', 'c', 'b', 'a']);
assert.deepEqual(fill('A', 'E', 2), ['A', 'C', 'E']);
assert.deepEqual(fill('z', 'v', 2), ['z', 'x', 'v']);
}
// 4. fill preserves zero-padding format when string inputs have leading zeros
{
assert.deepEqual(fill('01', '05'), ['01', '02', '03', '04', '05']);
assert.deepEqual(fill('001', '005'), ['001', '002', '003', '004', '005']);
assert.deepEqual(fill('01', '10', 2), ['01', '03', '05', '07', '09']);
assert.deepEqual(fill('05', '01'), ['05', '04', '03', '02', '01']);
}
// 5. fill transforms output values using a custom transform function
{
const result1 = fill(1, 3, (val) => String.fromCharCode(val + 64));
assert.deepEqual(result1, ['A', 'B', 'C']);
const result2 = fill(1, 3, (val) => val * 10);
assert.deepEqual(result2, [10, 20, 30]);
const result3 = fill(1, 3, { transform: (val, index) => `${index}:${val}` });
assert.deepEqual(result3, ['0:1', '1:2', '2:3']);
}
// 6. fill converts number ranges to string arrays when stringify option is enabled
{
assert.deepEqual(fill(1, 5, { stringify: true }), ['1', '2', '3', '4', '5']);
assert.deepEqual(fill(-2, 2, { stringify: true }), ['-2', '-1', '0', '1', '2']);
}
// 7. fill generates regex range patterns when toRegex option is enabled
{
assert.equal(fill(1, 5, { toRegex: true }), '[1-5]');
assert.equal(fill('a', 'e', { toRegex: true }), '[a-e]');
assert.equal(fill(1, 10, 2, { toRegex: true }), '1|3|5|7|9');
assert.equal(fill('01', '05', { toRegex: true }), '0?[1-5]');
}
// 8. fill handles single-argument and invalid range options
{
assert.deepEqual(fill(1), [1]);
assert.deepEqual(fill('a'), ['a']);
assert.deepEqual(fill(1, 'foo'), []);
assert.throws(
() => fill(1, 'foo', { strictRanges: true }),
/^RangeError: Invalid range arguments:/
);
assert.throws(
() => fill(1, 5, 'invalid_step', { strictRanges: true }),
/^TypeError: Expected step "invalid_step" to be a number/
);
}
Ursprungs-Seeder
anonym