mime-types
Advanced tools
Comparing version 2.1.15 to 2.1.16
@@ -0,1 +1,11 @@ | ||
2.1.16 / 2017-07-24 | ||
=================== | ||
* deps: mime-db@~1.29.0 | ||
- Add `application/fido.trusted-apps+json` | ||
- Add extension `.wadl` to `application/vnd.sun.wadl+xml` | ||
- Add extension `.gz` to `application/gzip` | ||
- Add new upstream MIME types | ||
- Update extensions `.md` and `.markdown` to be `text/markdown` | ||
2.1.15 / 2017-03-23 | ||
@@ -2,0 +12,0 @@ =================== |
10
index.js
@@ -23,4 +23,4 @@ /*! | ||
var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/ | ||
var textTypeRegExp = /^text\//i | ||
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ | ||
var TEXT_TYPE_REGEXP = /^text\//i | ||
@@ -56,3 +56,3 @@ /** | ||
// TODO: use media-typer | ||
var match = extractTypeRegExp.exec(type) | ||
var match = EXTRACT_TYPE_REGEXP.exec(type) | ||
var mime = match && db[match[1].toLowerCase()] | ||
@@ -65,3 +65,3 @@ | ||
// default text/* to utf-8 | ||
if (match && textTypeRegExp.test(match[1])) { | ||
if (match && TEXT_TYPE_REGEXP.test(match[1])) { | ||
return 'UTF-8' | ||
@@ -116,3 +116,3 @@ } | ||
// TODO: use media-typer | ||
var match = extractTypeRegExp.exec(type) | ||
var match = EXTRACT_TYPE_REGEXP.exec(type) | ||
@@ -119,0 +119,0 @@ // get extensions |
{ | ||
"name": "mime-types", | ||
"description": "The ultimate javascript content-type utility.", | ||
"version": "2.1.15", | ||
"version": "2.1.16", | ||
"contributors": [ | ||
@@ -17,9 +17,11 @@ "Douglas Christopher Wilson <doug@somethingdoug.com>", | ||
"dependencies": { | ||
"mime-db": "~1.27.0" | ||
"mime-db": "~1.29.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "3.18.0", | ||
"eslint-config-standard": "7.1.0", | ||
"eslint": "3.19.0", | ||
"eslint-config-standard": "10.2.1", | ||
"eslint-plugin-import": "2.7.0", | ||
"eslint-plugin-node": "5.1.1", | ||
"eslint-plugin-promise": "3.5.0", | ||
"eslint-plugin-standard": "2.1.1", | ||
"eslint-plugin-standard": "3.0.1", | ||
"istanbul": "0.4.5", | ||
@@ -26,0 +28,0 @@ "mocha": "1.21.5" |
@@ -51,3 +51,3 @@ # mime-types | ||
mime.lookup('json') // 'application/json' | ||
mime.lookup('.md') // 'text/x-markdown' | ||
mime.lookup('.md') // 'text/markdown' | ||
mime.lookup('file.html') // 'text/html' | ||
@@ -85,3 +85,3 @@ mime.lookup('folder/file.js') // 'application/javascript' | ||
```js | ||
mime.charset('text/x-markdown') // 'UTF-8' | ||
mime.charset('text/markdown') // 'UTF-8' | ||
``` | ||
@@ -88,0 +88,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13449
8
+ Addedmime-db@1.29.0(transitive)
- Removedmime-db@1.27.0(transitive)
Updatedmime-db@~1.29.0