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 Versions

1
10

4.3.2

Diff

Changelog

Source

4.3.2

  • Do not send 405 if route matched but status is 404. Fixes #112, closes #114.
amingoia
published 4.3.1 •

Changelog

Source

4.3.1

  • Do not run middleware if not yielded to by previous middleware. Fixes #115.
amingoia
published 4.3.0 •

Changelog

Source

4.3.0

  • Add support for router prefixes.
  • Add MIT license.
amingoia
published 4.2.0 •

Changelog

Source

4.2.0

  • Fixed issue with router middleware being applied even if no route was matched.
  • Router.url - new static method to generate url from url pattern and data
amingoia
published 4.1.0 •

Changelog

Source

4.1.0

Private API changed to separate context parameter decoration from route matching. Router#match and Route#match are now pure functions that return an array of routes that match the URL path.

For modules using this private API that need to determine if a method and path match a route, route.methods must be checked against the routes returned from router.match():

var matchedRoute = router.match(path).filter(function (route) {
  return ~route.methods.indexOf(method);
}).shift();
amingoia
published 4.0.1 •

amingoia
published 4.0.0 •

Changelog

Source

4.0.0

405, 501, and OPTIONS response handling was moved into separate middleware router.allowedMethods(). This resolves incorrect 501 or 405 responses when using multiple routers.

Breaking changes

4.x is mostly backwards compatible with 3.x, except for the following:

  • Instantiating a router with new and app returns the router instance, whereas 3.x returns the router middleware. When creating a router in 4.x, the only time router middleware is returned is when creating using the Router(app) signature (with app and without new).
amingoia
published 3.8.0 •

amingoia
published 3.7.0 •

amingoia
published 3.6.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