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

Stub TypeScript definitions entry for mime, which provides its own types definitions

  • 4.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
27M
increased by5.59%
Maintainers
1
Weekly downloads
 
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 31 Mar 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

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