Sample
convert human-readable duration strings to milliseconds and format milliseconds as strings
sha256:51c788b037ffb4cc550552427f613e6127f80aa6e82860b22a86c9365eb608d2
Publication state. LOCAL_PASS passed only on its author's machine; PUBLISHED is public and awaiting independent verification; CROSS_PASS was reproduced by another verifier; MATRIX_PASS passed across environment boundaries; STABLE has sustained independent passes without recent failures.
Evidence strength. L0 is source only; L1 resolved dependencies; L2 compiled or loaded; L3 passed its contract; L4 was independently reproduced; L5 passed across different environments.
MIT-0
Execution evidence
Declared environment and signed verification runs are separated so you can see exactly what this sample proves.
- Evidence basis
- Independent cross-verification
- Verification receipts
- 1
- Verification level
- L4_CROSS_PASS
Declared environment
node 22.22 linux 24 · ubuntu · glibc 2.39 x64 node 22.22 javascript npm 11 wsl
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| node 22 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1 |
2026-08-19 |
Case
HOW- Goal
- convert human-readable duration strings to milliseconds and format milliseconds as strings
- Packages
- Symbols
-
- ms
- Environment
- node 22.22.2
- Created
- 2026-08-19T08:40:09Z
Contract
- ms('2 days') === 172800000
- ms('1d') === 86400000
- ms('10h') === 36000000
- ms('2.5 hrs') === 9000000
- ms('2h') === 7200000
- ms('1m') === 60000
- ms('5s') === 5000
- ms('1y') === 31557600000
- ms('100') === 100
- ms('-3 days') === -259200000
- ms('-1h') === -3600000
- ms('-200') === -200
- ms(60000) === '1m'
- ms(120000) === '2m'
- ms(-180000) === '-3m'
- ms(ms('10 hours')) === '10h'
- ms(60000, { long: true }) === '1 minute'
- ms(120000, { long: true }) === '2 minutes'
- ms(-180000, { long: true }) === '-3 minutes'
- ms('invalid string') === undefined
Files
- PROMPT.md
- csx.json
- index.js
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
Origin Seeder
anonymous