Router middleware for Koa. Maintained by @forwardemail and @ladjs.
Installations
npm install koa-router
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>= 18
Node Version
18.20.4
NPM Version
10.7.0
Score
98.3
Supply Chain
95.9
Quality
78.7
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (98.85%)
Shell (0.64%)
Makefile (0.4%)
Handlebars (0.11%)
Developer
koajs
Download Statistics
Total Downloads
125,118,879
Last Day
18,376
Last Week
265,402
Last Month
1,615,034
Last Year
21,920,607
GitHub Statistics
872 Stars
485 Commits
176 Forks
19 Watching
2 Branches
94 Contributors
Bundle Size
18.96 kB
Minified
6.89 kB
Minified + Gzipped
Package Meta Information
Latest Version
13.0.1
Package Id
koa-router@13.0.1
Unpacked Size
33.44 kB
Size
10.02 kB
File Count
6
NPM Version
10.7.0
Node Version
18.20.4
Publised On
13 Sept 2024
Total Downloads
Cumulative downloads
Total Downloads
125,118,879
Last day
-75.5%
18,376
Compared to previous day
Last week
-32.7%
265,402
Compared to previous week
Last month
-15.3%
1,615,034
Compared to previous month
Last year
3.1%
21,920,607
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
@koa/router
Router middleware for Koa. Maintained by Forward Email and Lad.
Table of Contents
Features
- Express-style routing (
app.get
,app.put
,app.post
, etc.) - Named URL parameters
- Named routes with URL generation
- Match routes with specific host
- Responds to
OPTIONS
requests with allowed methods - Support for
405 Method Not Allowed
and501 Not Implemented
- Multiple route middleware
- Multiple and nestable routers
async/await
support
Migrating to 7 / Koa 2
- The API has changed to match the new promise-based middleware signature of koa 2. See the koa 2.x readme for more information.
- Middleware is now always run in the order declared by
.use()
(or.get()
, etc.), which matches Express 4 API.
Install
npm:
1npm install @koa/router
Typescript Support
1npm install --save-dev @types/koa__router
API Reference
See API Reference for more documentation.
Contributors
Name |
---|
Alex Mingoia |
@koajs |
Imed Jaberi |
License
MIT © Alex Mingoia
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/koajs/.github/SECURITY.md:1
- Info: Found linked content: github.com/koajs/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/koajs/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/koajs/.github/SECURITY.md:1
Reason
Found 7/30 approved changesets -- score normalized to 2
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/koajs/router/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/koajs/router/ci.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:25
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 7 are checked with a SAST tool
Score
4.2
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More