Skip to content

Commit

Permalink
docs: document platform requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
broofa committed Sep 13, 2023
1 parent a4cce8a commit 0a89c60
Show file tree
Hide file tree
Showing 5 changed files with 394 additions and 3,086 deletions.
8 changes: 6 additions & 2 deletions README.md
Expand Up @@ -9,15 +9,19 @@ A comprehensive, compact MIME type module.
[![NPM version](https://img.shields.io/npm/v/mime)](https://www.npmjs.com/package/mime)
[![NPM downloads](https://img.shields.io/npm/dm/mime)](https://www.npmjs.com/package/mime)

> **Important**
> Starting with `mime@4`:
> * ESM module support is required. See the [ESM Module FAQ](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). If you need CommonJS support (e.g. `require('mime')`), use `mime@3`.
> * [ES2019](https://caniuse.com/?search=es2020) support is required**.
> * Typescript types are built-in. (`@types/mime` is no longer needed)
## Install

### NPM
```
npm install mime
```

IMPORTANT: `mime >= 4` is ESM-only. If CommonJS support is required, `npm install mime@3`. [ESM Module FAQ](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).

## Quick Start

For the full version (800+ MIME types, 1,000+ extensions):
Expand Down
8 changes: 6 additions & 2 deletions docs/README_js.md
Expand Up @@ -10,14 +10,18 @@ A comprehensive, compact MIME type module.
[![NPM version](https://img.shields.io/npm/v/mime)](https://www.npmjs.com/package/mime)
[![NPM downloads](https://img.shields.io/npm/dm/mime)](https://www.npmjs.com/package/mime)

> **Important**
> Starting with `mime@4`:
> * ESM module support is required. See the [ESM Module FAQ](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). If you need CommonJS support (e.g. `require('mime')`), use `mime@3`.
> * [ES2019](https://caniuse.com/?search=es2020) support is required**.
> * Typescript types are built-in. (`@types/mime` is no longer needed)
## Install

```bash
npm install mime
```

IMPORTANT: `mime >= 4` is ESM-only. If CommonJS support is required, `npm install mime@3`. [ESM Module FAQ](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).

## Quick Start

For the full version (800+ MIME types, 1,000+ extensions):
Expand Down

0 comments on commit 0a89c60

Please sign in to comment.