koa-simple-static
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -25,2 +25,4 @@ 'use strict'; | ||
var _zeelib = require('zeelib'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -33,10 +35,2 @@ | ||
const safeDecodeURIComponent = (str /*: string*/) /*: string*/ => { | ||
try { | ||
return decodeURIComponent(str); | ||
} catch (_) { | ||
return str; | ||
} | ||
}; | ||
const loadFile = (name /*: string*/, dir /*: string*/, options /*: Object*/, files /*: Object*/) /*: Object*/ => { | ||
@@ -102,3 +96,3 @@ const pathname = (0, _path.normalize)((0, _path.join)(options.prefix, name)); | ||
// normalize for `//index` | ||
let filename = safeDecodeURIComponent((0, _path.normalize)(ctx.path)); | ||
let filename = (0, _zeelib.safeDecodeURIComponent)((0, _path.normalize)(ctx.path)); | ||
@@ -105,0 +99,0 @@ let file = files[filename]; |
{ | ||
"name": "koa-simple-static", | ||
"description": "Simple caching static file server for Koa 2.", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"author": { | ||
@@ -44,3 +44,4 @@ "name": "Zac Anger", | ||
"mime-types": "2.1.15", | ||
"mz": "2.6.0" | ||
"mz": "2.6.0", | ||
"zeelib": "0.9.20" | ||
}, | ||
@@ -61,3 +62,3 @@ "devDependencies": { | ||
"eslint-plugin-flowtype-errors": "3.3.0", | ||
"eslint-plugin-import": "2.3.0", | ||
"eslint-plugin-import": "2.6.0", | ||
"eslint-plugin-node": "5.0.0", | ||
@@ -69,3 +70,3 @@ "eslint-plugin-promise": "3.5.0", | ||
"istanbul": "0.4.5", | ||
"koa": "2.2.0", | ||
"koa": "2.3.0", | ||
"supertest": "3.0.0", | ||
@@ -72,0 +73,0 @@ "tap-spec": "4.1.1", |
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
212124
5
5468
+ Addedzeelib@0.9.20
+ Addedzeelib@0.9.20(transitive)