Beispiel
is-arrayish 0.2.1: isArrayish
Verifiziertes Beispiel für npm is-arrayish 0.2.1: isArrayish. Der Vertrag lief auf node 22 · linux alpine/x64 · docker und bestand.
sha256:b52e48c0d23e187cf39bf53b557644ef7189c5f6bac340b6103a4de55019936c
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
- 2
- 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 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-26 |
| 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-07 |
Fall
HOW- Ziel
- verify isArrayish in pkg:npm/is-arrayish@0.2.1
- Pakete
- Symbole
-
- isArrayish
- Umgebung
- node 22.23.2
- Erstellt
- 2026-08-26T00:58:20Z
Contract
- isArrayish returns true for standard array literals and Array instances
- isArrayish returns true for objects with a non-negative length property and a splice function
- isArrayish returns false for null, undefined, and falsy primitives
- isArrayish returns false for plain objects without length or splice methods
- isArrayish returns false for strings and primitive values
- isArrayish returns false for objects where length is negative or splice is not a function
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 isArrayish in pkg:npm/is-arrayish@0.2.1
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/is-arrayish@0.2.1
Demonstrate these symbols/APIs:
- isArrayish
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:20beb4625af8af4843a41a8f38dc5aa40b9d8123e6bb9979c89fc34af7f5af1f","constraints":{"executionContext":"node"},"contract":["isArrayish returns true for standard array literals and Array instances","isArrayish returns true for objects with a non-negative length property and a splice function","isArrayish returns false for null, undefined, and falsy primitives","isArrayish returns false for plain objects without length or splice methods","isArrayish returns false for strings and primitive values","isArrayish returns false for objects where length is negative or splice is not a function"],"goal":"verify isArrayish in pkg:npm/is-arrayish@0.2.1","kind":"HOW","packages":["pkg:npm/is-arrayish@0.2.1"],"schemaVersion":1,"symbols":["isArrayish"]},"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/is-arrayish@0.2.1"],"schemaVersion":1,"subject":"pkg:npm/is-arrayish@0.2.1","symbols":["isArrayish"],"verifierAdapter":"node-typescript@1"}
{
"name": "sample-is-arrayish",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-is-arrayish",
"version": "1.0.0",
"dependencies": {
"is-arrayish": "0.2.1"
}
},
"node_modules/is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
"license": "MIT"
}
}
}
{
"name": "sample-is-arrayish",
"version": "1.0.0",
"type": "module",
"private": true,
"dependencies": {
"is-arrayish": "0.2.1"
}
}
{
"schemaVersion": 1,
"goal": "verify isArrayish in pkg:npm/is-arrayish@0.2.1",
"kind": "HOW",
"packages": [
"pkg:npm/is-arrayish@0.2.1"
],
"symbols": [
"isArrayish"
],
"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 isArrayish from 'is-arrayish';
// 1. isArrayish returns true for standard array literals and Array instances
{
assert.equal(isArrayish([]), true);
assert.equal(isArrayish([1, 2, 3]), true);
assert.equal(isArrayish(new Array(5)), true);
}
// 2. isArrayish returns true for objects with a non-negative length property and a splice function
{
const customArrayish = {
length: 0,
splice: function () {},
};
assert.equal(isArrayish(customArrayish), true);
const populatedArrayish = {
0: 'hello',
1: 'world',
length: 2,
splice: Array.prototype.splice,
};
assert.equal(isArrayish(populatedArrayish), true);
}
// 3. isArrayish returns false for null, undefined, and falsy primitives
{
assert.equal(isArrayish(null), false);
assert.equal(isArrayish(undefined), false);
assert.equal(isArrayish(0), false);
assert.equal(isArrayish(''), false);
assert.equal(isArrayish(false), false);
assert.equal(isArrayish(NaN), false);
}
// 4. isArrayish returns false for plain objects without length or splice methods
{
assert.equal(isArrayish({}), false);
assert.equal(isArrayish({ a: 1, b: 2 }), false);
assert.equal(isArrayish({ length: 0 }), false);
assert.equal(isArrayish({ length: 5 }), false);
assert.equal(isArrayish({ splice: function () {} }), false);
}
// 5. isArrayish returns false for strings and primitive values
{
assert.equal(isArrayish('string'), false);
assert.equal(isArrayish(123), false);
assert.equal(isArrayish(true), false);
assert.equal(isArrayish(Symbol('test')), false);
assert.equal(isArrayish(BigInt(10)), false);
}
// 6. isArrayish returns false for objects where length is negative or splice is not a function
{
const negativeLength = {
length: -1,
splice: function () {},
};
assert.equal(isArrayish(negativeLength), false);
const nonFunctionSplice = {
length: 2,
splice: 'not a function',
};
assert.equal(isArrayish(nonFunctionSplice), false);
}
Ursprungs-Seeder
anonym