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.0
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.1
Choose a head ref
  • 12 commits
  • 11 files changed
  • 2 contributors

Commits on Dec 6, 2018

  1. Copy the full SHA
    9144f8f View commit details
  2. Turn no/yes choice into tasklist

    This allows for checking/unchecking with ease.
    maxnordlund authored Dec 6, 2018
    Copy the full SHA
    cea72b7 View commit details
  3. Turn no/yes choice into tasklist

    See #219 for the corresponding PR for the PR template.
    maxnordlund authored Dec 6, 2018
    Copy the full SHA
    522e744 View commit details
  4. Merge pull request #219 from maxnordlund/patch-2

    Turn no/yes choice into tasklist
    broofa authored Dec 6, 2018
    Copy the full SHA
    42a8cb8 View commit details
  5. Merge pull request #220 from maxnordlund/patch-3

     Turn no/yes choice into tasklist
    broofa authored Dec 6, 2018
    Copy the full SHA
    91f8f8b View commit details
  6. Merge pull request #218 from maxnordlund/patch-1

    Fix typo in documentation
    broofa authored Dec 6, 2018
    Copy the full SHA
    f6557d1 View commit details
  7. benchmark script

    broofa committed Dec 6, 2018
    Copy the full SHA
    a1d884c View commit details

Commits on Jan 23, 2019

  1. Copy the full SHA
    3e567a9 View commit details

Commits on Apr 3, 2019

  1. 1
    Copy the full SHA
    639c913 View commit details
  2. patch: mime-db@1.38.0

    broofa committed Apr 3, 2019
    Copy the full SHA
    30c9322 View commit details
  3. chore: upgrade packages

    broofa committed Apr 3, 2019
    Copy the full SHA
    392c87e View commit details
  4. chore(release): 2.4.1

    broofa committed Apr 3, 2019
    Copy the full SHA
    e3f7a2b View commit details
Showing with 2,175 additions and 750 deletions.
  1. +2 −2 .github/ISSUE_TEMPLATE.md
  2. +2 −2 .github/PULL_REQUEST_TEMPLATE.md
  3. +9 −0 CHANGELOG.md
  4. +4 −2 Mime.js
  5. +3 −0 README.md
  6. +2,060 −679 package-lock.json
  7. +11 −9 package.json
  8. +3 −0 src/README_js.md
  9. +26 −0 src/benchmark.js
  10. +54 −55 src/test.js
  11. +1 −1 types/standard.json
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

Locate the definition for your extension/type in the [db.json file](https://github.com/jshttp/mime-db/blob/master/db.json) in the `mime-db` project. Does it look right?

[ ] No. [File a `mime-db` issue](https://github.com/jshttp/mime-db/issues/new).
[ ] Yes: Go ahead and submit your issue/PR here and I'll look into it.
- [ ] No. [File a `mime-db` issue](https://github.com/jshttp/mime-db/issues/new).
- [ ] Yes: Go ahead and submit your issue/PR here and I'll look into it.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

Locate the definition for your extension/type in the [db.json file](https://github.com/jshttp/mime-db/blob/master/db.json) in the `mime-db` project. Does it look right?

[ ] No. [File a `mime-db` issue](https://github.com/jshttp/mime-db/issues/new).
[ ] Yes: Go ahead and submit your issue/PR here and I'll look into it.
- [ ] No. [File a `mime-db` issue](https://github.com/jshttp/mime-db/issues/new).
- [ ] Yes: Go ahead and submit your issue/PR here and I'll look into it.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,15 @@

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.1](https://github.com/broofa/node-mime/compare/v2.4.0...v2.4.1) (2019-04-03)


### Bug Fixes

* update MDN and mime-db types ([3e567a9](https://github.com/broofa/node-mime/commit/3e567a9))



<a name="2.4.0"></a>
# [2.4.0](https://github.com/broofa/node-mime/compare/v2.3.1...v2.4.0) (2018-11-26)

6 changes: 4 additions & 2 deletions Mime.js
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ function Mime() {
}

/**
* Define mimetype -> xtension mappings. Each key is a mime-type that maps
* Define mimetype -> extension mappings. Each key is a mime-type that maps
* to an array of extensions associated with the type. The first extension is
* used as the default extension for the type.
*
@@ -38,7 +38,9 @@ function Mime() {
*/
Mime.prototype.define = function(typeMap, force) {
for (var type in typeMap) {
var extensions = typeMap[type];
var extensions = typeMap[type].map(t => t.toLowerCase());
type = type.toLowerCase();

for (var i = 0; i < extensions.length; i++) {
var ext = extensions[i];

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -99,6 +99,9 @@ Module | Size
Both `require('mime')` and `require('mime/lite')` return instances of the MIME
class, documented below.

Note: Inputs to this API are case-insensitive. Outputs (returned values) will
be lowercase.

### new Mime(typeMap, ... more maps)

Most users of this module will not need to create Mime instances directly.
Loading