New: Introducing PHP and Composer Support.Read the Announcement
Socket
Book a DemoInstallSign in
Socket

@nxtedition/mime

Package Overview
Dependencies
Maintainers
10
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nxtedition/mime

MIME type lookup and extension resolution with built-in support for broadcast and professional media formats missing from the standard `mime` package.

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
0
Maintainers
10
Weekly downloads
 
Created
Source

@nxtedition/mime

MIME type lookup and extension resolution with built-in support for broadcast and professional media formats missing from the standard mime package.

Install

npm install @nxtedition/mime

Usage

Lookup MIME type by filename

import { lookup } from '@nxtedition/mime'

lookup('video.mxf') // 'application/mxf'
lookup('video.mp4') // 'video/mp4'
lookup('video.nut') // 'video/x-nut'
lookup('audio.ac3') // 'audio/ac3'
lookup('subs.stl') // 'application/x-ebu-stl'
lookup('subs.scc') // 'text/x-scc'

Get extension from MIME type

import { extension } from '@nxtedition/mime'

extension('video/mp4') // 'mp4'
extension('video/x-dnxhd') // 'dnxhd'
extension('audio/ac3') // 'ac3'
extension('application/x-ebu-stl') // 'stl'
extension('video/quicktime', 'clip.mov') // 'mov'

Broadcast & media types

Types handled beyond the standard mime package:

ExtensionMIME TypeFormat
.nutvideo/x-nutNUT container
.dnxhdvideo/x-dnxhdAvid DNxHD/DNxHR
.dvvideo/x-dvDV video
.h265video/h265Raw HEVC stream
.av1video/av1Raw AV1 stream
.ffv1video/ffv1FFV1 archival codec
.vc1video/vc1VC-1 video
.ac3audio/ac3Dolby Digital
.eac3audio/eac3Dolby Digital Plus
.opusaudio/opusOpus audio
.flacaudio/flacFLAC lossless
.pcm-s16leaudio/x-pcm-s16leRaw 16-bit PCM
.pcm-s24leaudio/x-pcm-s24leRaw 24-bit PCM
.pcm-s32leaudio/x-pcm-s32leRaw 32-bit PCM
.stlapplication/x-ebu-stlEBU STL subtitles
.scctext/x-sccScenarist Closed Captions
.capapplication/x-capSoftel CAP captions
.890application/x-890Cavena 890 subtitles
.pacapplication/x-pacScreen Electronics PAC
.asstext/x-assAdvanced SubStation Alpha
.ssatext/x-ssaSubStation Alpha
.exrimage/x-exrOpenEXR
.cinimage/x-cinCineon
.ismapplication/vnd.ms-sstr+xmlSmooth Streaming

API

lookup(name: string): string | null

Returns the MIME type for the given filename or path, or null if unknown.

extension(mimeType: string, fileName?: string): string | null

Returns the file extension for the given MIME type, or null if unknown. The optional fileName parameter is used to disambiguate (e.g. video/quicktimemov when the filename ends in .mov).

License

MIT

FAQs

Package last updated on 16 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts