Sample
caniuse-lite 1.0.30001806
Verified sample for npm caniuse-lite 1.0.30001806. The contract ran on node 22 · linux alpine/x64 · docker and passed: getAgent(browserName) returns browser…
sha256:72f9e79342e347fe17a151a4699a1a2a7e6c347d4ceb0c483c81f0d7138b9642
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@1node:22-alpine@sha256:c610fcdfb1d5… |
2026-08-27 |
Case
HOW- Goal
- verify pkg:npm/caniuse-lite@1.0.30001806
- Packages
- Environment
- node 22.23.2
- Created
- 2026-08-27T14:56:00Z
Contract
- getAgent(browserName) returns browser metadata including name, prefix, and supported versions
- getFeature(featureName) unpacks and returns feature title, status, and browser support stats
- getFeatureSupport(featureName, browserName, version) returns support status string or null for invalid queries
- isFeatureSupported(featureName, browserName, version) returns true for supported browser versions and false otherwise
- getRegionStats(regionData) unpacks regional browser usage statistics
Files
- PROMPT.md
- csx.json
- index.mjs
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
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/caniuse-lite@1.0.30001806
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/caniuse-lite@1.0.30001806
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:31e03bfb8e90209d82de5e1732c6ce2d313c5ea8581f75e6242dbf705ce0397a","constraints":{"executionContext":"node"},"contract":["getAgent(browserName) returns browser metadata including name, prefix, and supported versions","getFeature(featureName) unpacks and returns feature title, status, and browser support stats","getFeatureSupport(featureName, browserName, version) returns support status string or null for invalid queries","isFeatureSupported(featureName, browserName, version) returns true for supported browser versions and false otherwise","getRegionStats(regionData) unpacks regional browser usage statistics"],"goal":"verify pkg:npm/caniuse-lite@1.0.30001806","kind":"HOW","packages":["pkg:npm/caniuse-lite@1.0.30001806"],"schemaVersion":1},"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/caniuse-lite@1.0.30001806"],"schemaVersion":1,"subject":"pkg:npm/caniuse-lite@1.0.30001806","verifierAdapter":"node-typescript@1"}
import { agents, feature, features, region } from 'caniuse-lite';
export function getAgent(browserName) {
return agents[browserName] ?? null;
}
export function getFeature(featureName) {
const raw = features[featureName];
if (!raw) return null;
return feature(raw);
}
export function getFeatureSupport(featureName, browserName, version) {
const feat = getFeature(featureName);
if (!feat || !feat.stats || !feat.stats[browserName]) return null;
return feat.stats[browserName][version] ?? null;
}
export function isFeatureSupported(featureName, browserName, version) {
const support = getFeatureSupport(featureName, browserName, version);
if (!support) return false;
return support.startsWith('y');
}
export function getRegionStats(regionData) {
return region(regionData);
}
{
"name": "sample-caniuse-lite",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-caniuse-lite",
"version": "1.0.0",
"dependencies": {
"caniuse-lite": "1.0.30001806"
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001806",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001806.tgz",
"integrity": "sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"license": "CC-BY-4.0"
}
}
}
{
"name": "sample-caniuse-lite",
"version": "1.0.0",
"description": "Clean-room verification sample for caniuse-lite",
"type": "module",
"private": true,
"dependencies": {
"caniuse-lite": "1.0.30001806"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/caniuse-lite@1.0.30001806",
"kind": "HOW",
"packages": [
"pkg:npm/caniuse-lite@1.0.30001806"
],
"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 usRegion from 'caniuse-lite/data/regions/US.js';
import {
getAgent,
getFeature,
getFeatureSupport,
isFeatureSupported,
getRegionStats
} from '../index.mjs';
// 1. getAgent(browserName) returns browser metadata including name, prefix, and supported versions
const chromeAgent = getAgent('chrome');
assert.ok(chromeAgent !== null, 'Chrome agent should exist');
assert.equal(chromeAgent.browser, 'Chrome');
assert.equal(chromeAgent.prefix, 'webkit');
assert.ok(Array.isArray(chromeAgent.versions), 'Versions should be an array');
assert.ok(chromeAgent.versions.includes('100'), 'Versions should include version 100');
assert.equal(typeof chromeAgent.usage_global['100'], 'number');
assert.equal(getAgent('nonexistent_browser'), null);
// 2. getFeature(featureName) unpacks and returns feature title, status, and browser support stats
const fetchFeature = getFeature('fetch');
assert.ok(fetchFeature !== null, 'Fetch feature should exist');
assert.equal(fetchFeature.title, 'Fetch');
assert.equal(typeof fetchFeature.status, 'string');
assert.ok(fetchFeature.stats && typeof fetchFeature.stats === 'object');
assert.equal(getFeature('nonexistent_feature'), null);
// 3. getFeatureSupport(featureName, browserName, version) returns support status string or null for invalid queries
assert.equal(getFeatureSupport('fetch', 'chrome', '100'), 'y');
assert.equal(getFeatureSupport('fetch', 'ie', '11'), 'n');
assert.equal(getFeatureSupport('css-grid', 'ie', '11'), 'a x #2');
assert.equal(getFeatureSupport('fetch', 'chrome', 'invalid_ver_9999'), null);
assert.equal(getFeatureSupport('nonexistent_feature', 'chrome', '100'), null);
// 4. isFeatureSupported(featureName, browserName, version) returns true for supported browser versions and false otherwise
assert.equal(isFeatureSupported('fetch', 'chrome', '100'), true);
assert.equal(isFeatureSupported('fetch', 'ie', '11'), false);
assert.equal(isFeatureSupported('css-grid', 'chrome', '60'), true);
assert.equal(isFeatureSupported('css-grid', 'chrome', '57'), true);
assert.equal(isFeatureSupported('css-grid', 'ie', '11'), false);
assert.equal(isFeatureSupported('nonexistent_feature', 'chrome', '100'), false);
// 5. getRegionStats(regionData) unpacks regional browser usage statistics
const usStats = getRegionStats(usRegion);
assert.ok(usStats && typeof usStats === 'object');
assert.ok('chrome' in usStats);
assert.equal(typeof usStats.chrome['100'], 'number');
console.log('All caniuse-lite@1.0.30001806 contract assertions passed.');
Origin Seeder
anonymous