Socket
Socket
Sign inDemoInstall

mime-types

Package Overview
Dependencies
1
Maintainers
3
Versions
55
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.11 to 2.1.12

7

HISTORY.md

@@ -0,1 +1,8 @@

2.1.12 / 2016-09-18
===================
* deps: mime-db@~1.24.0
- Add new mime types
- Add `audio/mp3`
2.1.11 / 2016-05-01

@@ -2,0 +9,0 @@ ===================

16

index.js

@@ -49,3 +49,3 @@ /*!

function charset(type) {
function charset (type) {
if (!type || typeof type !== 'string') {

@@ -78,3 +78,3 @@ return false

function contentType(str) {
function contentType (str) {
// TODO: should this even be in this module?

@@ -109,3 +109,3 @@ if (!str || typeof str !== 'string') {

function extension(type) {
function extension (type) {
if (!type || typeof type !== 'string') {

@@ -135,3 +135,3 @@ return false

function lookup(path) {
function lookup (path) {
if (!path || typeof path !== 'string') {

@@ -158,7 +158,7 @@ return false

function populateMaps(extensions, types) {
function populateMaps (extensions, types) {
// source preference (least -> most)
var preference = ['nginx', 'apache', undefined, 'iana']
Object.keys(db).forEach(function forEachMimeType(type) {
Object.keys(db).forEach(function forEachMimeType (type) {
var mime = db[type]

@@ -182,4 +182,4 @@ var exts = mime.extensions

if (types[extension] !== 'application/octet-stream'
&& from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {
if (types[extension] !== 'application/octet-stream' &&
from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {
// skip the remapping

@@ -186,0 +186,0 @@ continue

{
"name": "mime-types",
"description": "The ultimate javascript content-type utility.",
"version": "2.1.11",
"version": "2.1.12",
"contributors": [

@@ -17,6 +17,10 @@ "Douglas Christopher Wilson <doug@somethingdoug.com>",

"dependencies": {
"mime-db": "~1.23.0"
"mime-db": "~1.24.0"
},
"devDependencies": {
"istanbul": "0.4.3",
"eslint": "3.5.0",
"eslint-config-standard": "6.0.1",
"eslint-plugin-promise": "2.0.1",
"eslint-plugin-standard": "2.0.0",
"istanbul": "0.4.5",
"mocha": "1.21.5"

@@ -33,2 +37,3 @@ },

"scripts": {
"lint": "eslint **/*.js",
"test": "mocha --reporter spec test/test.js",

@@ -35,0 +40,0 @@ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc