Skip to content
Effect 4.0 is here. One ecosystem. Zero dependencies.

Mime unstable

Standard MIME type lookup.

3 exports Since v4.0.0 Source

Utilities

Since v4.0.0

Returns every file extension associated with a standard MIME type.

Signature

declare function getAllExtensions(type: string): Option<ReadonlySet<string>>
Since v4.0.0

Returns the default file extension associated with a standard MIME type.

Signature

declare function getExtension(type: string): Option<string>

getType

unstable
Since v4.0.0

Returns the standard MIME type associated with a file name or extension.

Signature

declare function getType(path: string): Option<string>