CodeSampleX

Ejemplo

type detection for primitives, built-ins, and complex JavaScript objects using type-detect

sha256:cdbd7ba6fa2e2fa4e23268791e70644ce520d8ed87a8521630dbf86f26941c24

Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido. Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas. MIT-0

Evidencia de ejecución

El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.

Base de evidencia
Contrato firmado aprobado
Recibos de verificación
1
Claves de firma que lo compilaron
1
Entorno declarado linux 24 · ubuntu · glibc 2.39 x64 npm

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
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

Caso

HOW
Objetivo
type detection for primitives, built-ins, and complex JavaScript objects using type-detect
Paquetes
Símbolos
  • typeDetect
Creado
2026-08-27T21:21:10Z

Contrato

  1. typeDetect(null) === "null"
  2. typeDetect(undefined) === "undefined"
  3. typeDetect(42) === "number"
  4. typeDetect(NaN) === "number"
  5. typeDetect("hello") === "string"
  6. typeDetect(true) === "boolean"
  7. typeDetect(Symbol("test")) === "symbol"
  8. typeDetect(100n) === "bigint"
  9. typeDetect([]) === "Array"
  10. typeDetect({}) === "Object"
  11. typeDetect(new Map()) === "Map"
  12. typeDetect(new Set()) === "Set"
  13. typeDetect(new WeakMap()) === "WeakMap"
  14. typeDetect(new WeakSet()) === "WeakSet"
  15. typeDetect(Promise.resolve()) === "Promise"
  16. typeDetect(/regex/g) === "RegExp"
  17. typeDetect(new Date()) === "Date"
  18. typeDetect(new Error("err")) === "Error"
  19. typeDetect(new Uint8Array(8)) === "Uint8Array"
  20. typeDetect(new ArrayBuffer(16)) === "ArrayBuffer"
  21. typeDetect(new DataView(new ArrayBuffer(16))) === "DataView"
  22. typeDetect(() => {}) === "function"
  23. typeDetect(function named() {}) === "function"

Archivos

  • PROMPT.md
  • csx.json
  • index.mjs
  • package-lock.json
  • package.json
  • spec.json
  • test/contract.mjs

Descargar el artefacto de código fuente (tar.gz)

Seeder de origen

anónimo