npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nxtedition/mime

v1.0.1

Published

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

Readme

@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:

| Extension | MIME Type | Format | | ------------ | ----------------------------- | ------------------------- | | .nut | video/x-nut | NUT container | | .dnxhd | video/x-dnxhd | Avid DNxHD/DNxHR | | .dv | video/x-dv | DV video | | .h265 | video/h265 | Raw HEVC stream | | .av1 | video/av1 | Raw AV1 stream | | .ffv1 | video/ffv1 | FFV1 archival codec | | .vc1 | video/vc1 | VC-1 video | | .ac3 | audio/ac3 | Dolby Digital | | .eac3 | audio/eac3 | Dolby Digital Plus | | .opus | audio/opus | Opus audio | | .flac | audio/flac | FLAC lossless | | .pcm-s16le | audio/x-pcm-s16le | Raw 16-bit PCM | | .pcm-s24le | audio/x-pcm-s24le | Raw 24-bit PCM | | .pcm-s32le | audio/x-pcm-s32le | Raw 32-bit PCM | | .stl | application/x-ebu-stl | EBU STL subtitles | | .scc | text/x-scc | Scenarist Closed Captions | | .cap | application/x-cap | Softel CAP captions | | .890 | application/x-890 | Cavena 890 subtitles | | .pac | application/x-pac | Screen Electronics PAC | | .ass | text/x-ass | Advanced SubStation Alpha | | .ssa | text/x-ssa | SubStation Alpha | | .exr | image/x-exr | OpenEXR | | .cin | image/x-cin | Cineon | | .ism | application/vnd.ms-sstr+xml | Smooth 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