Socket
Socket
Sign inDemoInstall

koa-router

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-router - npm Package Compare versions

Comparing version 3.1.4 to 3.2.0

2

lib/router.js

@@ -82,2 +82,4 @@ /**

if (method === this.method) {
this.route = route;
// Merge the matching routes params into context params

@@ -84,0 +86,0 @@ merge(this.params, params);

2

package.json

@@ -9,3 +9,3 @@ {

"author": "Alex Mingoia <talk@alexmingoia.com>",
"version": "3.1.4",
"version": "3.2.0",
"keywords": [

@@ -12,0 +12,0 @@ "koa",

@@ -51,2 +51,8 @@ # Router middleware for [koa](https://github.com/koajs/koa)

```javascript
var koa = require('koa');
, mount = require('koa-mount')
, Router = require('koa-router');
var app = koa();
var APIv1 = new Router();

@@ -63,4 +69,5 @@ var APIv2 = new Router();

app.use(mount('/v1', APIv1.middleware()));
app.use(mount('/v2', APIv2.middleware()));
app
.use(mount('/v1', APIv1.middleware()))
.use(mount('/v2', APIv2.middleware()));
```

@@ -67,0 +74,0 @@

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