Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/mime

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/mime

TypeScript definitions for mime

  • 2.0.1
  • ts2.0
  • ts2.1
  • ts2.2
  • ts2.3
  • ts2.4
  • ts2.5
  • ts2.6
  • ts2.7
  • ts2.8
  • ts2.9
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @types/mime?

The @types/mime package contains TypeScript type definitions for the 'mime' package, which is a utility to work with MIME types. It allows TypeScript developers to use the 'mime' package with type safety, providing autocompletion and type checking during development.

What are @types/mime's main functionalities?

Lookup MIME type for a file extension

This feature allows you to get the MIME type for a given file extension. The getType function takes a file extension as a string and returns the corresponding MIME type.

"import mime from 'mime';

const mimeType = mime.getType('json'); // 'application/json'"

Get file extension for a MIME type

This feature allows you to get the file extension associated with a given MIME type. The getExtension function takes a MIME type as a string and returns the corresponding file extension.

"import mime from 'mime';

const extension = mime.getExtension('application/json'); // 'json'"

Other packages similar to @types/mime

FAQs

Package last updated on 05 Feb 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc