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
Score
98.3
Supply Chain
95.9
Quality
85.1
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
103,489,982
Last Day
76,787
Last Week
969,232
Last Month
4,610,858
Last Year
40,263,267
GitHub Statistics
872 Stars
485 Commits
176 Forks
19 Watching
2 Branches
94 Contributors
Bundle Size
19.67 kB
Minified
7.00 kB
Minified + Gzipped
Package Meta Information
Latest Version
13.1.0
Package Id
@koa/router@13.1.0
Unpacked Size
38.29 kB
Size
11.78 kB
File Count
9
Publised On
18 Sept 2024
Total Downloads
Cumulative downloads
Total Downloads
103,489,982
Last day
-67%
76,787
Compared to previous day
Last week
-8.9%
969,232
Compared to previous week
Last month
2.2%
4,610,858
Compared to previous month
Last year
37.4%
40,263,267
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