Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/markwhitaker/mimetypes.js

MIME type constants for JavaScript developers
https://github.com/markwhitaker/mimetypes.js

content-type content-types javascript library mime mime-type mime-types module npm npm-module npm-package package

Last synced: about 11 hours ago
JSON representation

MIME type constants for JavaScript developers

Awesome Lists containing this project

README

        

![icon](artwork/MimeTypes-icon-100.png)

# MimeTypes.js [![Build and test](https://github.com/markwhitaker/MimeTypes.js/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/markwhitaker/MimeTypes.js/actions/workflows/build-and-test.yml) [![Publish to npm](https://github.com/markwhitaker/MimeTypes.js/actions/workflows/publish-to-npm.yml/badge.svg)](https://github.com/markwhitaker/MimeTypes.js/actions/workflows/publish-to-npm.yml) [![npm](https://img.shields.io/npm/v/mimetype-constants)](https://www.npmjs.com/package/mimetype-constants) [![npm](https://img.shields.io/npm/dw/mimetype-constants)](https://www.npmjs.com/package/mimetype-constants)

A structured collection of MIME type constants to use in your JavaScript projects.

## Installation

```
npm i mimetype-constants
```

## Usage

Replace this sort of thing...

```
"application/json"
```

with this...

```
MimeTypes.Application.Json
```

Pull requests welcome!

## Also for JavaScript developers

![icon](https://raw.githubusercontent.com/markwhitaker/RegexToolbox.js/master/artwork/RegexToolbox-icon-32.png) [RegexToolbox.js](https://github.com/markwhitaker/RegexToolbox.js): Regular expression tools for JavaScript developers

## MimeTypes for other languages

![icon](https://raw.githubusercontent.com/markwhitaker/MimeTypes.NET/master/Artwork/MimeTypes-icon-32.png) [MimeTypes for .NET](https://github.com/markwhitaker/MimeTypes.NET)

![icon](https://raw.githubusercontent.com/markwhitaker/MimeTypes.Java/master/artwork/MimeTypes-icon-32.png) [MimeTypes for Java](https://github.com/markwhitaker/MimeTypes.Java)

![icon](https://raw.githubusercontent.com/markwhitaker/MimeTypes.kt/master/artwork/MimeTypes-icon-32.png) [MimeTypes for Kotlin](https://github.com/markwhitaker/MimeTypes.kt)