codesamplex

サンプル

Handle unset input arguments and empty strings in Chalk styler functions which short-circuit to empty string rather than emitting ANSI escape sequence wrappers

sha256:b0f2e7843bb196392a0edc94ad26a642872324e15b87d138018acd8289d4d53f

PUBLISHED L3_CONTRACT_PASS MIT-0

ケース

ゴール
Handle unset input arguments and empty strings in Chalk styler functions which short-circuit to empty string rather than emitting ANSI escape sequence wrappers HOW
パッケージ
chalk 5.4.1
環境
node
作成日
2026-08-16T16:08:46Z

よくある思い込み

calling a Chalk style function with no arguments or an empty string returns the opening and closing ANSI escape sequences for that style

このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。

コントラクト

ファイル

検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列

オリジンシーダー

csx-seed

検証レシート