Socket
Socket
Sign inDemoInstall

simple-mime

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 0.0.5

2

package.json

@@ -5,3 +5,3 @@ {

"tags": ["mime", "http", "stack"],
"version": "0.0.4",
"version": "0.0.5",
"author": "Tim Caswell <tim@creationix.com>",

@@ -8,0 +8,0 @@ "repository": {

@@ -6,6 +6,10 @@ // A simple mime database.

path = path.toLowerCase().trim();
var index = path.lastIndexOf(".");
var index = path.lastIndexOf("/");
if (index >= 0) {
path = path.substr(index + 1);
}
index = path.lastIndexOf(".");
if (index >= 0) {
path = path.substr(index + 1);
}
return types[path] || defaultMime;

@@ -33,5 +37,6 @@ };

bz2: "application/x-bzip2",
c: "text/x-c",
c: "text/x-csrc",
cab: "application/vnd.ms-cab-compressed",
cc: "text/x-c",
can: "application/candor",
cc: "text/x-c++src",
chm: "application/vnd.ms-htmlhelp",

@@ -70,4 +75,4 @@ "class": "application/octet-stream",

gz: "application/x-gzip",
h: "text/x-c",
hh: "text/x-c",
h: "text/x-chdr",
hh: "text/x-c++hdr",
htm: "text/html",

@@ -88,2 +93,3 @@ html: "text/html",

log: "text/plain",
makefile: "text/x-makefile",
m3u: "audio/x-mpegurl",

@@ -93,7 +99,7 @@ m4v: "video/mp4",

manifest: "text/cache-manifest",
markdown: "text/markdown",
markdown: "text/x-markdown",
mathml: "application/mathml+xml",
mbox: "application/mbox",
mdoc: "text/troff",
md: "text/markdown",
md: "text/x-markdown",
me: "text/troff",

@@ -100,0 +106,0 @@ mid: "audio/midi",

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