Skip to content

Commit c5cb3f2

Browse files
committed
fix: update to latest mime-db
1 parent 7f4ecd0 commit c5cb3f2

File tree

6 files changed

+1295
-850
lines changed

6 files changed

+1295
-850
lines changed

README.md

-6
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ const mime = require('mime');
5252

5353
mime.getType('txt'); // ⇨ 'text/plain'
5454
mime.getExtension('text/plain'); // ⇨ 'txt'
55-
5655
```
5756

5857
See [Mime API](#mime-api) below for API details.
@@ -122,7 +121,6 @@ const typeMap = {
122121
const myMime = new Mime(typeMap);
123122
myMime.getType('abc'); // ⇨ 'text/abc'
124123
myMime.getExtension('text/def'); // ⇨ 'leppard'
125-
126124
```
127125

128126
If more than one map argument is provided, each map is `define()`ed (see below), in order.
@@ -140,15 +138,13 @@ mime.getType('dir/text.txt'); // ⇨ 'text/plain'
140138
mime.getType('dir\\text.txt'); // ⇨ 'text/plain'
141139
mime.getType('.text.txt'); // ⇨ 'text/plain'
142140
mime.getType('.txt'); // ⇨ 'text/plain'
143-
144141
```
145142

146143
`null` is returned in cases where an extension is not detected or recognized
147144

148145
```javascript
149146
mime.getType('foo/txt'); // ⇨ null
150147
mime.getType('bogus_type'); // ⇨ null
151-
152148
```
153149

154150
### mime.getExtension(type)
@@ -159,7 +155,6 @@ Content-Type headers) are ignored.
159155
mime.getExtension('text/plain'); // ⇨ 'txt'
160156
mime.getExtension('application/json'); // ⇨ 'json'
161157
mime.getExtension('text/html; charset=utf8'); // ⇨ 'html'
162-
163158
```
164159

165160
### mime.define(typeMap[, force = false])
@@ -177,7 +172,6 @@ mime.define({'text/x-abc': ['abc', 'abcd']});
177172

178173
mime.getType('abcd'); // ⇨ 'text/x-abc'
179174
mime.getExtension('text/x-abc') // ⇨ 'abc'
180-
181175
```
182176

183177
## Command Line

0 commit comments

Comments
 (0)