Updating NPM dependencies
This commit is contained in:
10
node_modules/mime/README.md
generated
vendored
10
node_modules/mime/README.md
generated
vendored
@@ -5,7 +5,7 @@
|
||||
|
||||
A comprehensive, compact MIME type module.
|
||||
|
||||
[](https://travis-ci.org/broofa/node-mime)
|
||||
[](https://travis-ci.org/broofa/mime)
|
||||
|
||||
## Version 2 Notes
|
||||
|
||||
@@ -15,7 +15,7 @@ Version 2 is a breaking change from 1.x as the semver implies. Specifically:
|
||||
* `extension()` renamed to `getExtension()`
|
||||
* `charset()` and `load()` methods have been removed
|
||||
|
||||
If you prefer the legacy version of this module please `npm install mime@^1`. Version 1 docs may be found [here](https://github.com/broofa/node-mime/tree/v1.4.0).
|
||||
If you prefer the legacy version of this module please `npm install mime@^1`. Version 1 docs may be found [here](https://github.com/broofa/mime/tree/v1.4.0).
|
||||
|
||||
## Install
|
||||
|
||||
@@ -52,7 +52,6 @@ const mime = require('mime');
|
||||
|
||||
mime.getType('txt'); // ⇨ 'text/plain'
|
||||
mime.getExtension('text/plain'); // ⇨ 'txt'
|
||||
|
||||
```
|
||||
|
||||
See [Mime API](#mime-api) below for API details.
|
||||
@@ -122,7 +121,6 @@ const typeMap = {
|
||||
const myMime = new Mime(typeMap);
|
||||
myMime.getType('abc'); // ⇨ 'text/abc'
|
||||
myMime.getExtension('text/def'); // ⇨ 'leppard'
|
||||
|
||||
```
|
||||
|
||||
If more than one map argument is provided, each map is `define()`ed (see below), in order.
|
||||
@@ -140,7 +138,6 @@ mime.getType('dir/text.txt'); // ⇨ 'text/plain'
|
||||
mime.getType('dir\\text.txt'); // ⇨ 'text/plain'
|
||||
mime.getType('.text.txt'); // ⇨ 'text/plain'
|
||||
mime.getType('.txt'); // ⇨ 'text/plain'
|
||||
|
||||
```
|
||||
|
||||
`null` is returned in cases where an extension is not detected or recognized
|
||||
@@ -148,7 +145,6 @@ mime.getType('.txt'); // ⇨ 'text/plain'
|
||||
```javascript
|
||||
mime.getType('foo/txt'); // ⇨ null
|
||||
mime.getType('bogus_type'); // ⇨ null
|
||||
|
||||
```
|
||||
|
||||
### mime.getExtension(type)
|
||||
@@ -159,7 +155,6 @@ Content-Type headers) are ignored.
|
||||
mime.getExtension('text/plain'); // ⇨ 'txt'
|
||||
mime.getExtension('application/json'); // ⇨ 'json'
|
||||
mime.getExtension('text/html; charset=utf8'); // ⇨ 'html'
|
||||
|
||||
```
|
||||
|
||||
### mime.define(typeMap[, force = false])
|
||||
@@ -177,7 +172,6 @@ mime.define({'text/x-abc': ['abc', 'abcd']});
|
||||
|
||||
mime.getType('abcd'); // ⇨ 'text/x-abc'
|
||||
mime.getExtension('text/x-abc') // ⇨ 'abc'
|
||||
|
||||
```
|
||||
|
||||
## Command Line
|
||||
|
||||
Reference in New Issue
Block a user