Sample
react-is 18.3.1: isSuspense
Verified sample for npm react-is 18.3.1: isSuspense. The contract ran on node 22 · linux alpine/x64 · docker and passed: isSuspense returns true for valid…
sha256:a30b8e5c202103568520056cec248dd4fdfb106ec2b15a1e25fc75b468de2385
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
linux 24 · ubuntu · glibc 2.39 x64 npm
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-30 |
Case
HOW- Goal
- verify react-is.isSuspense in pkg:npm/react-is@18.3.1
- Packages
- Symbols
-
- react-is.isSuspense
- Created
- 2026-08-30T10:00:32Z
Contract
- isSuspense returns true for valid React Suspense elements
- isSuspense returns false for standard DOM element objects and Fragment elements
- isSuspense returns false for plain objects, null, undefined, and primitives
- isSuspense returns false for the raw Suspense symbol when not wrapped in an element
- typeOf returns Suspense symbol for React Suspense elements
Files
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- src/index.js
- 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 react-is.isSuspense in pkg:npm/react-is@18.3.1
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/react-is@18.3.1
Demonstrate these symbols/APIs:
- react-is.isSuspense
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:575d72d01b4041c355fdde99842b7904a403c31a35cbb0ecfd284bd295e49e38","contract":["isSuspense returns true for valid React Suspense elements","isSuspense returns false for standard DOM element objects and Fragment elements","isSuspense returns false for plain objects, null, undefined, and primitives","isSuspense returns false for the raw Suspense symbol when not wrapped in an element","typeOf returns Suspense symbol for React Suspense elements"],"goal":"verify react-is.isSuspense in pkg:npm/react-is@18.3.1","kind":"HOW","packages":["pkg:npm/react-is@18.3.1"],"schemaVersion":1,"symbols":["react-is.isSuspense"]},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"npm","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/react-is@18.3.1"],"schemaVersion":1,"subject":"pkg:npm/react-is@18.3.1","symbols":["react-is.isSuspense"],"verifierAdapter":"node-typescript@1"}
{
"name": "sample-react-is-suspense",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-react-is-suspense",
"version": "1.0.0",
"dependencies": {
"react-is": "18.3.1"
}
},
"node_modules/react-is": {
"version": "18.3.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
"integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
"license": "MIT"
}
}
}
{
"name": "sample-react-is-suspense",
"version": "1.0.0",
"private": true,
"description": "Clean-room verification of react-is.isSuspense in react-is 18.3.1",
"type": "module",
"main": "src/index.js",
"dependencies": {
"react-is": "18.3.1"
}
}
{
"schemaVersion": 1,
"goal": "verify react-is.isSuspense in pkg:npm/react-is@18.3.1",
"kind": "HOW",
"packages": [
"pkg:npm/react-is@18.3.1"
],
"symbols": [
"react-is.isSuspense"
]
}
import { isSuspense, Suspense, typeOf } from 'react-is';
/**
* Check if the given value is a valid React Suspense element.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a Suspense element.
*/
export function checkIsSuspense(value) {
return isSuspense(value);
}
/**
* Get the element type symbol of a value using typeOf.
*
* @param {*} value - The value to inspect.
* @returns {symbol|undefined} The React element type symbol or undefined.
*/
export function identifyTypeOf(value) {
return typeOf(value);
}
export { isSuspense, Suspense, typeOf };
import assert from 'node:assert/strict';
import {
checkIsSuspense,
identifyTypeOf,
isSuspense,
Suspense,
typeOf,
} from '../src/index.js';
// 1. Export types verification
assert.equal(typeof isSuspense, 'function', 'isSuspense must be exported as a function');
assert.equal(typeof checkIsSuspense, 'function', 'checkIsSuspense helper must be a function');
assert.equal(typeof identifyTypeOf, 'function', 'identifyTypeOf helper must be a function');
assert.equal(typeof typeOf, 'function', 'typeOf must be exported as a function');
assert.equal(typeof Suspense, 'symbol', 'Suspense must be exported as a symbol');
// 2. Suspense element detection
const suspenseElement = {
$$typeof: Symbol.for('react.element'),
type: Symbol.for('react.suspense'),
props: { fallback: null, children: [] },
key: null,
ref: null,
};
assert.equal(isSuspense(suspenseElement), true, 'isSuspense must return true for valid Suspense element');
assert.equal(checkIsSuspense(suspenseElement), true, 'checkIsSuspense helper must return true for valid Suspense element');
// 3. Non-Suspense element rejection
const plainElement = {
$$typeof: Symbol.for('react.element'),
type: 'div',
props: { className: 'container' },
key: null,
ref: null,
};
const fragmentElement = {
$$typeof: Symbol.for('react.element'),
type: Symbol.for('react.fragment'),
props: {},
key: null,
ref: null,
};
assert.equal(isSuspense(plainElement), false, 'isSuspense must return false for standard DOM element');
assert.equal(checkIsSuspense(plainElement), false, 'checkIsSuspense must return false for standard DOM element');
assert.equal(isSuspense(fragmentElement), false, 'isSuspense must return false for Fragment element');
// 4. Non-element and primitive values rejection
assert.equal(isSuspense({}), false, 'isSuspense must return false for plain empty object');
assert.equal(isSuspense(null), false, 'isSuspense must return false for null');
assert.equal(isSuspense(undefined), false, 'isSuspense must return false for undefined');
assert.equal(isSuspense('suspense'), false, 'isSuspense must return false for string');
assert.equal(isSuspense(123), false, 'isSuspense must return false for number');
assert.equal(isSuspense(true), false, 'isSuspense must return false for boolean');
assert.equal(isSuspense(Symbol.for('react.suspense')), false, 'isSuspense must return false for raw Symbol without element envelope');
assert.equal(isSuspense(Suspense), false, 'isSuspense must return false for exported Suspense symbol');
// 5. Element type identification
assert.equal(typeOf(suspenseElement), Suspense, 'typeOf must return Suspense symbol for Suspense element');
assert.equal(identifyTypeOf(suspenseElement), Suspense, 'identifyTypeOf helper must return Suspense symbol');
assert.equal(typeOf(plainElement) !== Suspense, true, 'typeOf for plainElement must not equal Suspense symbol');
assert.equal(typeOf({}), undefined, 'typeOf on non-element must return undefined');
console.log('All contract assertions for react-is.isSuspense in react-is@18.3.1 passed.');
Origin Seeder
anonymous