Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
broofa committed Sep 13, 2023
1 parent 07c9133 commit 37db7be
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Expand Up @@ -22,7 +22,6 @@ All notable changes to this project will be documented in this file. See [standa

* drop CJS support, switch to TS ([cf20ba0](https://github.com/broofa/mime/commit/cf20ba0db586a256307f875c585b112b96db9c9a))
* exit from CLI with non-zero exit code when no result ([591eb30](https://github.com/broofa/mime/commit/591eb30c2d5aefcbac9cda8ad1fca17f7ed23fff))
* skypack.dev for direct browser import, fixes [#263](https://github.com/broofa/mime/issues/263) ([41db4c0](https://github.com/broofa/mime/commit/41db4c042ccf50ea7baf3d2160ea37dcca37998d))
* update outdated deps, rebuild ([ef6ebd0](https://github.com/broofa/mime/commit/ef6ebd0c8e0c412f21389d8fee642cfceca2b975))


Expand Down
8 changes: 6 additions & 2 deletions README.md
Expand Up @@ -10,15 +10,16 @@ A comprehensive, compact MIME type module.
[![NPM downloads](https://img.shields.io/npm/dm/mime)](https://www.npmjs.com/package/mime)

> **Important**
> `mime@4` is currently in **beta**. To try in out, `npm install mime@beta`. See the [Changelog](https://github.com/broofa/mime/blob/main/CHANGELOG.md) for details.
>
> 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
```
```bash
npm install mime
```

Expand Down Expand Up @@ -124,6 +125,9 @@ mime.getExtension('application/json'); // ⇨ 'json'
mime.getExtension('text/html; charset=utf8'); // ⇨ 'html'
### mime.getAllExtensions(type)

> **Note**
> New in `mime@4`

Get all extensions for the given mime type.

```javascript --run default
Expand Down
5 changes: 5 additions & 0 deletions docs/README_js.md
Expand Up @@ -11,6 +11,8 @@ A comprehensive, compact MIME type module.
[![NPM downloads](https://img.shields.io/npm/dm/mime)](https://www.npmjs.com/package/mime)

> **Important**
> `mime@4` is currently in **beta**. To try in out, `npm install mime@beta`. See the [Changelog](https://github.com/broofa/mime/blob/main/CHANGELOG.md) for details.
>
> 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**.
Expand Down Expand Up @@ -126,6 +128,9 @@ mime.getExtension('text/html; charset=utf8'); // RESULT

### mime.getAllExtensions(type)

> **Note**
> New in `mime@4`
Get all extensions for the given mime type.

```javascript --run default
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -38,7 +38,7 @@
"mime-score": "2.0.3",
"mime-types": "2.1.35",
"prettier": "3.0.3",
"runmd": "1.3.9",
"runmd": "1.3.9",:
"standard-version": "9.5.0",
"typescript": "5.2.2"
},
Expand Down

0 comments on commit 37db7be

Please sign in to comment.