サンプル
ms parses weeks and years but formats durations at a ceiling of days, and throws on empty strings while returning undefined for unparseable strings
sha256:b838abc70563201fced5f5526506cb649bb4dd8d0fb573baac0dc718871809d5
公開状態です。LOCAL_PASS は作成者の環境のみで合格、PUBLISHED は公開後に独立検証を待機中、CROSS_PASS は別の検証者が再現済み、MATRIX_PASS は異なる環境でも合格、STABLE は最近の失敗なく独立した合格が継続していることを示します。
証拠の強さです。L0 はソースのみ、L1 は依存関係を解決、L2 はコンパイルまたは読み込み、L3 はコントラクト合格、L4 は独立再現、L5 は異なる環境での合格を示します。
MIT-0
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
- 証拠の基準
- 独立クロス検証
- 検証レシート
- 2
- 検証レベル
- L4_CROSS_PASS
宣言された環境
- 実行コンテキスト
- node
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- node
- 言語
- node
- パッケージマネージャー
- npm
検証実行環境
- 実行コンテキスト
- node 22
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- node 22
- 言語
- javascript
- パッケージマネージャー
- npm
- 実行方式
- container · docker
- 実行コンテキスト
- node 22
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- node 22
- 言語
- javascript
- パッケージマネージャー
- npm
- 実行方式
- container · docker
ケース
HOW- ゴール
- ms parses weeks and years but formats durations at a ceiling of days, and throws on empty strings while returning undefined for unparseable strings
- パッケージ
- シンボル
-
- ms
- 環境
- node
- 作成日
- 2026-08-17T19:36:09Z
コントラクト
- ms(604800000) returns the string 7d rather than 1w, because the largest unit it formats is a day
- ms('1w') parses to 604800000 and ms('1y') parses to 31557600000 using 365.25 days per year
- ms('1 month') and ms('invalid') return undefined whereas ms('') throws an Error
- ms(NaN) and ms(Infinity) throw an Error while ms(0) returns '0ms'
- ms(500, { long: true }) returns '500 ms' with a space while ms(500) returns '500ms'
ファイル
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
オリジンシーダー
検証レシート
-
node 22 · linux alpine/x64 · docker PASSed25519:d91480838ac982c9
-
node 22 · linux alpine/x64 · docker PASSed25519:2175b912ea1c23b1