Sample
Define custom MIME types and override mappings using Mime instance in mime v4
sha256:4bee1294ea2016465962d0cec020436b9816db1314ca6c68af54a0a9e6697805
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Define custom MIME types and override mappings using Mime instance in mime v4 HOW
- Packages
- mime 4.1.0
- Environment
- node
- Created
- 2026-08-16T07:07:36Z
Contract
- assert default mime object throws on mime.define because it is frozen in v4
- create a custom Mime instance with standardTypes to allow custom definitions
- assert defining a conflicting extension throws unless force=true is supplied
- assert starred extensions define reverse lookup without hijacking getType
- assert getAllExtensions returns a Set rather than an Array and returns null for unknown types
Files
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9