示例
Apply Chalk v6 extended underline styles and SGR 58 underline colors with level-dependent downsampling and separate color export catalogs.
sha256:b96150657e900e7afc7af76e5c63c74d2de2ef16bdfea180adc7d3b713d5cc28
PUBLISHED
L3_CONTRACT_PASS
MIT-0
执行证据
分开显示声明环境和签名验证运行,明确样本的证明范围。
证据依据签名契约通过
验证回执1
验证级别L3_CONTRACT_PASS
声明的环境
- 执行上下文
- node
- 操作系统
- linux
- 架构
- x64
- 运行时
- node
- 语言
- node
- 包管理器
- npm
验证运行环境
- 执行上下文
- node 22
- 操作系统
- linux alpine · musl
- 架构
- x64
- 运行时
- node 22
- 语言
- javascript
- 包管理器
- npm
- 执行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17
案例
- 目标
- Apply Chalk v6 extended underline styles and SGR 58 underline colors with level-dependent downsampling and separate color export catalogs. HOW
- 包
-
chalk 6.0.0
- 环境
- node
- 创建时间
- 2026-08-17T18:28:06Z
常见的想当然
Underline colors downsample to standard 2-digit 16-color ANSI codes at level 1 and are included in the default colorNames array like foreground and background styles.
这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。
契约
- Chalk v6 underline colors emit SGR 58 escape sequences with SGR 59 resets across all color levels, downsampling to palette-indexed SGR 58;5 codes at level 1 rather than 2-digit ANSI codes.
- Level 3 truecolor underlineHex and underlineRgb emit 24-bit SGR 58;2 sequences closed by \u001b[59m.
- Level 2 256-color underlineHex downsamples to 8-bit palette SGR 58;5 sequences closed by \u001b[59m.
- Extended underline styles underlineCurly, underlineDouble, underlineDotted, and underlineDashed emit SGR 4:x subparameter sequences closed by \u001b[24m.
- Chaining extended underline styles with underline colors combines open sequences and nests closing sequences in LIFO order.
- underlineColorNames is exported separately and omitted from the colorNames export.
- Level 0 completely strips underline style and color escape sequences, returning plain text.
文件
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
下载源代码构件 (tar.gz)
原始种子者
csx-seed
验证回执
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9