# @litert/mime-types

> Get MIME type based on file name.

Latest version **0.0.3** (published 2019-04-01) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @litert/mime-types
pnpm add @litert/mime-types
yarn add @litert/mime-types
bun add @litert/mime-types
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2019-04-01 |
| First published | 2019-04-01 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 1 |
| Unpacked size | 56.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | hanguoshuai |
| Maintainers | fenying, hanguoshuai, litertxrb |
| Keywords | litert, mime |

## Links

- npm: https://www.npmjs.com/package/@litert/mime-types
- Repository: https://github.com/litert/mime-types
- Homepage: https://github.com/litert/mime-types#readme
- Issues: https://github.com/litert/mime-types/issues
- npm.io page: https://npm.io/package/@litert/mime-types

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) ^11.12.2

## Recent versions

- 0.0.3 (latest) — 2019-04-01
- 0.0.2 — 2019-04-01
- 0.0.1 — 2019-04-01

## README

# mime-types

[![npm version](https://img.shields.io/npm/v/@litert/mime-types.svg?colorB=brightgreen)](https://www.npmjs.com/package/@litert/mime-types "Stable Version")
[![npm version](https://img.shields.io/npm/v/@litert/mime-types/dev.svg)](https://www.npmjs.com/package/@litert/mime-types "Development Version")
[![License](https://img.shields.io/github/license/litert/mime-types.svg)](https://github.com/litert/mime-types/blob/master/LICENSE)
[![node](https://img.shields.io/node/v/@litert/mime-types.svg?colorB=brightgreen)](https://nodejs.org/dist/latest-v10.x/)
[![GitHub issues](https://img.shields.io/github/issues/litert/mime-types.svg)](https://github.com/litert/mime-types/issues)
[![GitHub Releases](https://img.shields.io/github/release/litert/mime-types.svg)](https://github.com/litert/mime-types/releases "Stable Release")
[![GitHub Pre-Releases](https://img.shields.io/github/release/litert/mime-types/all.svg)](https://github.com/litert/mime-types/releases "Pre-Release")

Get MIME type based on file name.

## Installation

In the Node.js environment, you can install directly using NPM:

```sh
$ npm i @litert/mime-types --save
```

Or install the developing (unstable) version for newest features:

```sh
$ npm i @litert/mime-types@dev --save
```

## API

Demo code is written using TypeScript.

```typescript
import * as mime from "@litert/mime-types";

mime.get("hello.json");         // application/json
mime.get(".html");              // text/html
mime.get("css");                // text/css
mime.get("hi/baby.js");         // application/javascript
mime.get("/root/down/pk.zip");  // application/zip
mime.get("ext.dodooh");         // application/octet-stream
```

## License

This library is published under [Apache-2.0](./LICENSE) license.

---
_Source: https://npm.io/package/@litert/mime-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
