Keep runtime dependencies at zero
A dependency-free package stays small and easy to audit. The cost is leaving out broad convenience helpers in favor of a focused surface.
A small, type-safe TypeScript library of HTTP media type constants and helpers for parsing, formatting, matching, and validating Content-Type values.
Applications keep reimplementing Content-Type parsing and negotiation, and each version handles edge cases slightly differently. The usual alternative is importing a larger dependency tree for what is a focused HTTP-header task.
Quoted parameters and malformed header values must parse predictably.
The package output must work for both ESM and CommonJS consumers.
The public API must stay small and type-safe with no runtime dependencies.
The core is a pure TypeScript library with its own tests, built into dual ESM and CommonJS outputs with typed exports. A React documentation and playground app in the same workspace consumes the local package, so the docs always run the current code.
Pure TypeScript functions parse, format, match, and validate media types, backed by tests.
The tsup build produces dual ESM and CommonJS outputs with typed package exports.
A workspace-linked React documentation and playground app consumes the local package rather than a published release.
A dependency-free package stays small and easy to audit. The cost is leaving out broad convenience helpers in favor of a focused surface.
ESM and CommonJS consumers get the same API and type declarations without configuring interop themselves.
The docs app depends on workspace:*, so every app build exercises the current implementation instead of an older published version.

Share your challenge, scope, and timeline to start a focused conversation.