Sample
format millisecond durations to short or verbose strings and parse duration strings with ms
sha256:12e1cd1e7fb96215adf4fdfb55b0bf8130bc16041d5ef2e495cf9caae9509c19
This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured.
How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people.
MIT-0
Execution evidence
The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.
- Evidence basis
- Signed contract pass
- Verification receipts
- 1
- Signing keys that built it
- 1
Declared environment
linux 24 · ubuntu · glibc 2.39 x64 npm
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5… |
2026-08-27 |
Case
HOW- Goal
- format millisecond durations to short or verbose strings and parse duration strings with ms
- Packages
- Symbols
-
- ms
- Created
- 2026-08-27T12:47:11Z
Contract
- assert.strictEqual(ms('2 days'), 172800000);
- assert.strictEqual(ms('1d'), 86400000);
- assert.strictEqual(ms('10h'), 36000000);
- assert.strictEqual(ms('2.5 hrs'), 9000000);
- assert.strictEqual(ms('1m'), 60000);
- assert.strictEqual(ms('5s'), 5000);
- assert.strictEqual(ms('100'), 100);
- assert.strictEqual(ms('100ms'), 100);
- assert.strictEqual(ms('1y'), 31557600000);
- assert.strictEqual(ms(60000), '1m');
- assert.strictEqual(ms(2 * 60000), '2m');
- assert.strictEqual(ms(86400000), '1d');
- assert.strictEqual(ms(500), '500ms');
- assert.strictEqual(ms(60000, { long: true }), '1 minute');
- assert.strictEqual(ms(2 * 60000, { long: true }), '2 minutes');
- assert.strictEqual(ms(86400000, { long: true }), '1 day');
- assert.strictEqual(ms(2 * 86400000, { long: true }), '2 days');
- assert.strictEqual(ms('invalid'), undefined);
- assert.throws(() => ms(''), /val is not a non-empty string or a valid number/);
Files
- NOTES.md
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
Origin Seeder
anonymous