Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: broofa/mime
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.4.4
Choose a base ref
...
head repository: broofa/mime
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.4.5
Choose a head ref
  • 10 commits
  • 8 files changed
  • 2 contributors

Commits on Aug 26, 2019

  1. chore(deps): bump eslint-utils from 1.3.1 to 1.4.2

    Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2.
    - [Release notes](https://github.com/mysticatea/eslint-utils/releases)
    - [Commits](mysticatea/eslint-utils@v1.3.1...v1.4.2)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 26, 2019
    Copy the full SHA
    19dff2d View commit details

Commits on Sep 1, 2019

  1. Merge pull request #228 from broofa/dependabot/npm_and_yarn/eslint-ut…

    …ils-1.4.2
    
    chore(deps): bump eslint-utils from 1.3.1 to 1.4.2
    broofa authored Sep 1, 2019
    Copy the full SHA
    e37f20c View commit details
  2. chore(deps): bump lodash from 4.17.11 to 4.17.15 (#230)

    Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.15.
    - [Release notes](https://github.com/lodash/lodash/releases)
    - [Commits](lodash/lodash@4.17.11...4.17.15)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and broofa committed Sep 1, 2019
    Copy the full SHA
    d3402a9 View commit details
  3. chore(deps): bump lodash.template from 4.4.0 to 4.5.0 (#229)

    Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0.
    - [Release notes](https://github.com/lodash/lodash/releases)
    - [Commits](lodash/lodash@4.4.0...4.5.0)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and broofa committed Sep 1, 2019
    Copy the full SHA
    e9841f0 View commit details

Commits on Jan 4, 2020

  1. Update README.md

    broofa authored Jan 4, 2020
    Copy the full SHA
    7bb94a7 View commit details

Commits on Feb 20, 2020

  1. revert

    broofa committed Feb 20, 2020
    Copy the full SHA
    87cc2c6 View commit details

Commits on May 1, 2020

  1. fix: fix #236

    broofa committed May 1, 2020
    Copy the full SHA
    7f4ecd0 View commit details
  2. fix: update to latest mime-db

    broofa committed May 1, 2020
    Copy the full SHA
    c5cb3f2 View commit details
  3. chore: npm files

    broofa committed May 1, 2020
    Copy the full SHA
    ac19b7a View commit details
  4. chore(release): 2.4.5

    broofa committed May 1, 2020
    Copy the full SHA
    32a1681 View commit details
Showing with 1,329 additions and 866 deletions.
  1. +2 −1 .travis.yml
  2. +8 −0 CHANGELOG.md
  3. +0 −6 README.md
  4. +1,265 −848 package-lock.json
  5. +12 −6 package.json
  6. +40 −3 src/test.js
  7. +1 −1 types/other.js
  8. +1 −1 types/standard.js
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node_js
node_js:
- "6"
- "8"
- "10"
- "12"
- "14"
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [2.4.5](https://github.com/broofa/node-mime/compare/v2.4.4...v2.4.5) (2020-05-01)


### Bug Fixes

* fix [#236](https://github.com/broofa/node-mime/issues/236) ([7f4ecd0](https://github.com/broofa/node-mime/commit/7f4ecd0d850ed22c9e3bfda2c11fc74e4dde12a7))
* update to latest mime-db ([c5cb3f2](https://github.com/broofa/node-mime/commit/c5cb3f2ab8b07642a066efbde1142af1b90c927b))

### [2.4.4](https://github.com/broofa/node-mime/compare/v2.4.3...v2.4.4) (2019-06-07)


6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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,15 +138,13 @@ 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

```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
Loading