Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-simple-static

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-simple-static - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

12

lib/index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc