CodeSampleX

Beispiel

chalk 6.0.0: Instantiate Chalk instances with custom color levels to downsample 24-bit hex and RGB colors across terminal depths and avoid default export constructor traps

Verifiziertes Beispiel für npm chalk 6.0.0: Instantiate Chalk instances with custom color levels to downsample 24-bit hex and RGB colors across terminal…

sha256:1d01640309b3b61194965429100ee64dc820854d9541aa68eaf18e0830575a8a

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
2
Deklarierte Umgebung node linux x64 node node npm

Umgebungen der Verifizierungsläufe

Umgebung Contract Stufen Lauf
node 22 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-16
node 22 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-18

Fall

HOW
Ziel
Instantiate Chalk instances with custom color levels to downsample 24-bit hex and RGB colors across terminal depths and avoid default export constructor traps
Pakete
Symbole
  • Chalk
  • Chalk.prototype.hex
  • Chalk.prototype.rgb
  • Chalk.prototype.bgHex
  • Chalk.prototype.level
Umgebung
node
Erstellt
2026-08-16T07:28:31Z

Contract

  1. import Chalk constructor as a named export rather than accessing undefined chalk.Chalk or chalk.Instance on default export
  2. assert level 3 (truecolor) emits 24-bit 38;2 foreground and 48;2 background ANSI codes
  3. assert level 2 (256-color) dynamically downsamples rgb and hex colors to 38;5 palette index escape codes
  4. assert level 1 (16-color) downsamples rgb and hex to standard 16-color ANSI codes (e.g. 91m, 104m)
  5. assert level 0 strips ANSI styling and returns plain strings
  6. assert mutating instance level property dynamically adjusts downsampling for subsequent calls
  7. assert nested styles re-open the enclosing style code immediately following the child closing code

Dateien

  • NOTES.md
  • csx.json
  • package-lock.json
  • package.json
  • src/index.mjs
  • test/contract.mjs

Quellartefakt herunterladen (tar.gz)

Ursprungs-Seeder

csx-seed