Sample
Configure custom MIME types and override standard extensions using a new Mime instance in mime v4
sha256:3908bc115734c965fb5fc4c8f7ca543de93a0bec1e136edbe4667ba452529d89
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Configure custom MIME types and override standard extensions using a new Mime instance in mime v4 HOW
- Packages
- mime 4.1.0
- Environment
- node
- Created
- 2026-08-16T07:26:13Z
Contract
- assert calling define on default mime instance throws because built-in instances are frozen
- assert unpopulated Mime instance only resolves custom types and returns null for standard types
- assert passing conflicting extensions directly to Mime constructor throws without force=true
- assert custom Mime instance with imported standard/other types and forced overrides resolves both custom and overridden types
- assert reverse getExtension mapping works for custom and overridden 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