Socket
Book a DemoInstallSign in
Socket

@sidewinder/mime

Package Overview
Dependencies
Maintainers
0
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sidewinder/mime

Sidewinder Mime

latest
Source
npmnpm
Version
0.14.0
Version published
Weekly downloads
50
2.04%
Maintainers
0
Weekly downloads
 
Created
Source

Sidewinder Mime

Sidewinder Mime Types

Overview

This package contains a mime type lookup utility.

License MIT

Example

The Mime utility provides a single lookup function that accepts a path or filename and returns an default mime type. If the lookup function cannot resolve the mime type, it will return a default of application/octet-stream.

import { Mime } from '@sidewinder/mime'

const mime0 = Mime.lookup('directory/file.txt') // 'text/plain'
const mime1 = Mime.lookup('directory/file.xml') // 'application/xml'
const mime2 = Mime.lookup('directory/file.json') // 'application/json'
const mime3 = Mime.lookup('directory/file.png') // 'image/png'
const mime3 = Mime.lookup('directory/file.mp4') // 'video/mp4'

FAQs

Package last updated on 26 Jun 2024

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