サンプル
is-arrayish 0.2.1: isArrayish
検証済みサンプル — npm is-arrayish 0.2.1: isArrayish. node 22 · linux alpine/x64 · docker で contract を実行し、成功しました: isArrayish returns true for standard array literals…
sha256:b52e48c0d23e187cf39bf53b557644ef7189c5f6bac340b6103a4de55019936c
このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。
合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。
MIT-0
実行証拠
宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。
- 証拠の基準
- 署名済みコントラクト合格
- 検証レシート
- 2
- ビルドした署名鍵
- 1
宣言された環境
node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10
検証実行環境
| 環境 | コントラクト | ステージ | 実行日 |
|---|---|---|---|
| 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 |
ケース
HOW- ゴール
- verify isArrayish in pkg:npm/is-arrayish@0.2.1
- パッケージ
- シンボル
-
- isArrayish
- 環境
- node 22.23.2
- 作成日
- 2026-08-26T00:58:20Z
コントラクト
- 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
ファイル
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
ソース
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);
}
オリジンシーダー
匿名