Beispiel
caniuse-lite 1.0.30001823: agents, feature, features
Verifiziertes Beispiel für npm caniuse-lite 1.0.30001823: agents, feature, features. Der Vertrag lief auf node 22 · linux debian/x64 · docker und bestand.
sha256:b3a052f3c8bb199437725b33a8cc3e79bbf660f57e78b294449189c970830830
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-11-08 |
Fall
HOW- Ziel
- verify pkg:npm/caniuse-lite@1.0.30001823
- Pakete
- Symbole
-
- caniuse-lite.agents
- caniuse-lite.feature
- caniuse-lite.features
- caniuse-lite.region
- Umgebung
- node 22.23
- Erstellt
- 2026-11-08T02:49:09Z
Contract
- caniuse.feature(caniuse.features.flexbox) unpacks flexbox support status, title, and browser version stats map
- caniuse.agents.chrome provides Chrome browser metadata, prefix, version list, and global usage object
- caniuse.region(require('caniuse-lite/data/regions/US')) unpacks regional browser usage shares per version
Dateien
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- src/index.mjs
- 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 pkg:npm/caniuse-lite@1.0.30001823
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/caniuse-lite@1.0.30001823
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:c9dcf0733c1478f38b34f33a9676f3a779d50e10503bc2a669fc57c689db3074","contract":["caniuse.feature(caniuse.features.flexbox) unpacks flexbox support status, title, and browser version stats map","caniuse.agents.chrome provides Chrome browser metadata, prefix, version list, and global usage object","caniuse.region(require('caniuse-lite/data/regions/US')) unpacks regional browser usage shares per version"],"goal":"verify pkg:npm/caniuse-lite@1.0.30001823","kind":"HOW","packages":["pkg:npm/caniuse-lite@1.0.30001823"],"schemaVersion":1,"symbols":["caniuse-lite.agents","caniuse-lite.feature","caniuse-lite.features","caniuse-lite.region"]},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","executionContext":"node","language":"javascript","libc":"glibc","libcVersion":"2.39","moduleSystem":"esm","os":"linux","osVersionBucket":"24","packageManager":"npm","packageManagerVersion":"10.9.8","runtime":"node","runtimeVersion":"22.23","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/caniuse-lite@1.0.30001823"],"schemaVersion":1,"subject":"pkg:npm/caniuse-lite@1.0.30001823","symbols":["caniuse-lite.agents","caniuse-lite.feature","caniuse-lite.features","caniuse-lite.region"],"verifierAdapter":"node-typescript@1"}
{
"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.30001823"
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001823",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001823.tgz",
"integrity": "sha512-TQ5s/djDjNk1axreUW+4rULH+BmdCMLiJkhaXnO5wqivG7tITkSUj4ItIdzqdZHKaXcHAV8dhH3JxOM7/7bwqw==",
"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",
"private": true,
"type": "module",
"scripts": {
"test": "node test/contract.mjs"
},
"dependencies": {
"caniuse-lite": "1.0.30001823"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/caniuse-lite@1.0.30001823",
"kind": "HOW",
"packages": [
"pkg:npm/caniuse-lite@1.0.30001823"
]
}
import caniuse from 'caniuse-lite';
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
export function inspectFeatureSupport(featureKey) {
const packed = caniuse.features[featureKey];
if (!packed) {
throw new Error(`Unknown feature: ${featureKey}`);
}
return caniuse.feature(packed);
}
export function inspectRegionUsage(regionCode) {
const packedRegion = require(`caniuse-lite/data/regions/${regionCode}`);
return caniuse.region(packedRegion);
}
export function getAgentMetadata(browserKey) {
return caniuse.agents[browserKey] ?? null;
}
import assert from 'node:assert/strict';
import caniuse from 'caniuse-lite';
import {
inspectFeatureSupport,
inspectRegionUsage,
getAgentMetadata
} from '../src/index.mjs';
// 1. Verify feature list and feature() unpacking
assert.equal(typeof caniuse.features, 'object');
assert.ok('flexbox' in caniuse.features);
const flexbox = inspectFeatureSupport('flexbox');
assert.equal(typeof flexbox.title, 'string');
assert.ok(flexbox.title.length > 0);
assert.equal(flexbox.status, 'cr');
assert.equal(typeof flexbox.stats, 'object');
assert.equal(typeof flexbox.stats.chrome, 'object');
assert.ok(
Object.values(flexbox.stats.chrome).some((support) =>
support.split(' ').includes('y')
)
);
// 2. Verify agents metadata
const chromeAgent = getAgentMetadata('chrome');
assert.ok(chromeAgent !== null);
assert.equal(chromeAgent.browser, 'Chrome');
assert.equal(chromeAgent.prefix, 'webkit');
assert.ok(Array.isArray(chromeAgent.versions));
assert.equal(typeof chromeAgent.usage_global, 'object');
// 3. Verify region() unpacking
const usUsage = inspectRegionUsage('US');
assert.equal(typeof usUsage, 'object');
assert.equal(typeof usUsage.chrome, 'object');
assert.ok(
Object.values(usUsage.chrome).some(
(share) => typeof share === 'number' && share > 0
)
);
// 4. Verify unknown feature handling
assert.throws(
() => inspectFeatureSupport('non-existent-feature-xyz'),
/Unknown feature/
);
Ursprungs-Seeder
anonym