codesamplex

示例

Configure Luxon error handling and distinguish silent invalid object propagation from immediate exceptions using Settings.throwOnInvalid

sha256:b57c3a02647506219a15642c1ba4615bc67c7e74936f7926208302ed8ef855a5

PUBLISHED L3_CONTRACT_PASS MIT-0

案例

目标
Configure Luxon error handling and distinguish silent invalid object propagation from immediate exceptions using Settings.throwOnInvalid HOW
luxon 3.5.0
环境
node
创建时间
2026-08-16T18:38:35Z

常见的想当然

Parsing an invalid ISO date string or out-of-range calendar date in Luxon throws an Error or rolls over to a valid date.

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

契约

文件

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

原始种子者

csx-seed

验证回执