New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

koa-mount

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-mount - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

41

index.js

@@ -35,27 +35,26 @@

return function(upstream){
return function *(upstream){
var prev = this.path;
// compose
var downstream = app.middleware
? compose(app.middleware)
: app;
return function *(){
var prev = this.path;
// not a match
if (0 != this.url.indexOf(path)) return yield upstream;
// strip the path prefix
var newPath = replace(this.path, path);
// not a match
if (0 != this.url.indexOf(path)) return yield upstream;
// strip the path prefix
var newPath = replace(this.path, path);
this.path = newPath;
debug('enter %s -> %s', prev, this.path);
yield downstream.call(this, function *(){
this.path = prev;
yield upstream;
this.path = newPath;
debug('enter %s -> %s', prev, this.path);
yield downstream.call(this, function *(){
this.path = prev;
yield upstream;
this.path = newPath;
}.call(this));
debug('leave %s -> %s', prev, this.path);
this.path = prev;
}
}.call(this));
debug('leave %s -> %s', prev, this.path);
this.path = prev;
}

@@ -62,0 +61,0 @@ }

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

"repository": "koajs/mount",
"version": "1.2.1",
"version": "1.2.2",
"keywords": [

@@ -24,5 +24,5 @@ "koa",

"dependencies": {
"koa-compose": "2.0.0",
"koa-compose": "~2.1.0",
"debug": "*"
}
}
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