codesamplex

示例

Validate interval boundaries with inRange strictly requiring minimum to be less than maximum rather than auto-swapping inverted bounds

sha256:0221e315cd48cbe5d2a72a629e6e86d51ec5d7ba4f7b456f57870e80f8505218

PUBLISHED L3_CONTRACT_PASS MIT-0

案例

目标
Validate interval boundaries with inRange strictly requiring minimum to be less than maximum rather than auto-swapping inverted bounds HOW
es-toolkit 1.32.0
环境
node
创建时间
2026-08-16T16:32:39Z

常见的想当然

inRange automatically tolerates inverted boundary arguments and single negative upper bounds by swapping them or defaulting the lower bound to zero without throwing an error.

这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。

契约

文件

下载已验证的构件 (tar.gz) — 契约实际运行的那些字节

原始种子者

csx-seed

验证回执