# simple-mime

> A simple mime database.

Latest version **0.1.0** (published 2014-07-25) · 0 weekly downloads

## Install

```sh
npm install simple-mime
pnpm add simple-mime
yarn add simple-mime
bun add simple-mime
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-07-25 |
| First published | 2010-12-26 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | Tim Caswell |
| Maintainers | creationix |

## Links

- npm: https://www.npmjs.com/package/simple-mime
- Repository: http://github.com/creationix/simple-mime
- Homepage: https://github.com/creationix/simple-mime
- Issues: http://github.com/creationix/simple-mime/issues
- npm.io page: https://npm.io/package/simple-mime

## Recent versions

- 0.1.0 (latest) — 2014-07-25
- 0.0.8 — 2012-10-19
- 0.0.7 — 2012-10-19
- 0.0.6 — 2012-07-02
- 0.0.5 — 2012-04-03
- 0.0.4 — 2011-09-23
- 0.0.3 — 2011-04-30
- 0.0.2 — 2011-04-01
- 0.0.1 — 2010-12-26

## README

# Mime

This is a small, simple mime database.  A common thing for node servers to do is serve static files over HTTP.
This requires, among other things, knowin the mime type you want to send.  Here is a simple module to make this easy.

## Install

If you use NPM, then install this via npm.  Also, please remember to put it as a dependency in your package.json file of your module that requires it.

    npm install simple-mime

If you choose to not use npm, or can't use it in your environment, then simply copy the single file `simple-mime.js` to somewhere you can require it.

## Usage

Simply load this library, configure your fallback mime type, and query it for the mime type of various filenames.

```js
var getMimeType = require('simple-mime')('application/octet-stream');
var file = '/bar/foo/baz.mp3';
var type = getMimeType(file); // => 'audio/mpeg'
```

## Goal

You will probably not use this except as a dependency to your own module that deals with serving files over HTTP, or some other protocol that requires mime types.

This doesn't have as many features as the `mime` module in npm, but it's a lot simpler too.  The goal is that it's useful to someone.

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