Comparing version 0.2.3 to 0.3.0
@@ -37,14 +37,4 @@ /* | ||
}, | ||
_extGetter = (typeof process !== 'undefined' && process.platform === 'win32') ? require('./extensions/getter') : function (path) { | ||
var last = null, | ||
splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; | ||
if (!path.match('.')) { | ||
return path; | ||
} | ||
path = splitPathRe.exec(path).slice(1); | ||
last = path[path.length - 1]; | ||
return (last !== '') ? last : path[path.length - 2]; | ||
_extGetter = function (fileName) { | ||
return fileName.slice((fileName.lastIndexOf(".") - 1 >>> 0) + 2); | ||
}; | ||
@@ -74,3 +64,3 @@ | ||
ext = _extGetter(path).split('.')[1]; | ||
ext = _extGetter(path); | ||
@@ -77,0 +67,0 @@ return this.list[ext] || generic; |
{ | ||
"name": "mimer", | ||
"version": "0.2.3", | ||
"version": "0.3.0", | ||
"description": "A simple Mime type getter", | ||
@@ -5,0 +5,0 @@ "main": "mimer.js", |
@@ -80,2 +80,3 @@ Mimer [![Build Status](https://secure.travis-ci.org/data-uri/mimer.png?branch=master)](http://travis-ci.org/data-uri/mimer) [![NPM version](https://badge.fury.io/js/mimer.png)](http://badge.fury.io/js/mimer) | ||
* 0.3 - Remove potential REDOS vulnerability. Thanks to [James Davis](http://people.cs.vt.edu/~davisjam/) | ||
* 0.2 - Follow IANA RFC and full AMD and browser support | ||
@@ -82,0 +83,0 @@ * 0.1 - First release |
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
93
60903
12
122