Sample
fill-range 7.1.1
Verified sample for npm fill-range 7.1.1. The contract ran on node 22 · linux alpine/x64 · docker and passed: fillRange creates ascending and descending…
sha256:ef452b50010a37b07af8ad3aac28038c53c19fe70827bbcb829cc738a4cbfb6c
This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured.
How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people.
MIT-0
Execution evidence
The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.
- Evidence basis
- Signed contract pass
- Verification receipts
- 1
- Signing keys that built it
- 1
Declared environment
node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1 |
2026-08-20 |
Case
HOW- Goal
- verify pkg:npm/fill-range@7.1.1
- Packages
- Environment
- node 22.23.2
- Created
- 2026-08-20T14:35:17Z
Contract
- fillRange creates ascending and descending numeric ranges with optional step increments
- fillRange preserves zero-padding for numeric strings
- fillRange creates alphabetical character ranges in ascending and descending order
- fillRange supports toRegex option and custom transform functions
Files
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- src/index.js
- test/contract.js
Source
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 pkg:npm/fill-range@7.1.1
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/fill-range@7.1.1
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:1c98c66b2e26fca390136bd080e87d5a6b8b8ba657ab61251cf7d92a42b00dad","constraints":{"executionContext":"node"},"contract":["fillRange creates ascending and descending numeric ranges with optional step increments","fillRange preserves zero-padding for numeric strings","fillRange creates alphabetical character ranges in ascending and descending order","fillRange supports toRegex option and custom transform functions"],"goal":"verify pkg:npm/fill-range@7.1.1","kind":"HOW","packages":["pkg:npm/fill-range@7.1.1"],"schemaVersion":1},"contractCommand":["node","test/contract.js"],"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,"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",
"license": "MIT-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,
"description": "Clean-room verification sample for fill-range",
"main": "src/index.js",
"scripts": {
"test": "node test/contract.js"
},
"dependencies": {
"fill-range": "7.1.1"
},
"license": "MIT-0"
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/fill-range@7.1.1",
"kind": "HOW",
"packages": [
"pkg:npm/fill-range@7.1.1"
],
"constraints": {
"executionContext": "node"
},
"runtimeConditions": {
"ecosystem": "npm",
"language": "javascript",
"moduleSystem": "cjs",
"packageManager": "npm@10.9.8",
"runtime": "node@22.23.2"
}
}
const fillRange = require('fill-range');
function createRange(from, to, step, options) {
return fillRange(from, to, step, options);
}
module.exports = {
createRange
};
const assert = require('node:assert');
const fillRange = require('fill-range');
const { createRange } = require('../src/index.js');
// 1. Integer ranges
assert.deepStrictEqual(fillRange(1, 5), [1, 2, 3, 4, 5], 'should fill integer range ascending');
assert.deepStrictEqual(fillRange(5, 1), [5, 4, 3, 2, 1], 'should fill integer range descending');
assert.deepStrictEqual(fillRange(-2, 2), [-2, -1, 0, 1, 2], 'should fill negative integer range');
assert.deepStrictEqual(fillRange(1, 10, 2), [1, 3, 5, 7, 9], 'should fill integer range with step');
assert.deepStrictEqual(fillRange(10, 1, 3), [10, 7, 4, 1], 'should fill descending integer range with step');
// 2. String ranges and zero-padding
assert.deepStrictEqual(fillRange('1', '5'), ['1', '2', '3', '4', '5'], 'should fill string numeric range');
assert.deepStrictEqual(fillRange('01', '05'), ['01', '02', '03', '04', '05'], 'should preserve zero-padding');
assert.deepStrictEqual(fillRange('001', '005'), ['001', '002', '003', '004', '005'], 'should preserve multi-digit padding');
// 3. Alphabetical / character ranges
assert.deepStrictEqual(fillRange('a', 'e'), ['a', 'b', 'c', 'd', 'e'], 'should fill letter range ascending');
assert.deepStrictEqual(fillRange('e', 'a'), ['e', 'd', 'c', 'b', 'a'], 'should fill letter range descending');
assert.deepStrictEqual(fillRange('a', 'g', 2), ['a', 'c', 'e', 'g'], 'should fill letter range with step');
assert.deepStrictEqual(fillRange('A', 'E'), ['A', 'B', 'C', 'D', 'E'], 'should fill uppercase letter range');
// 4. Options and transform functions
assert.strictEqual(fillRange(1, 5, { toRegex: true }), '[1-5]', 'should create regex pattern with toRegex option');
assert.strictEqual(fillRange('a', 'e', { toRegex: true }), '[a-e]', 'should create regex pattern for letters');
const transformed = fillRange(1, 3, (val) => `item_${val}`);
assert.deepStrictEqual(transformed, ['item_1', 'item_2', 'item_3'], 'should apply custom transform function');
// 5. Wrapper function verification
assert.deepStrictEqual(createRange(1, 4), [1, 2, 3, 4], 'wrapper createRange should work for numbers');
assert.deepStrictEqual(createRange('a', 'c'), ['a', 'b', 'c'], 'wrapper createRange should work for letters');
console.log('Contract tests passed successfully.');
Origin Seeder
anonymous