サンプル
Parse boolean environment variables in Commander without presence-only truthiness trap
sha256:b953db7ef30e702f31dca9192e6ef548a50589157551d3ada4896bd8624d6d8d
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- Parse boolean environment variables in Commander without presence-only truthiness trap HOW
- パッケージ
- commander 15.0.0
- 環境
- node
- 作成日
- 2026-08-16T07:26:08Z
コントラクト
- prove new Option('--flag').env('VAR') evaluates to true when VAR is 'false' or '0'
- prove new Option('--flag [boolean]').preset('true').env('VAR').argParser() parses 'false' and '0' to false
- prove bare CLI flag --flag uses preset('true') and overrides falsy environment variables
- prove option value sources accurately report cli, env, and default precedence
ファイル
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列
オリジンシーダー
検証レシート
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9