Installations
npm install think-router-plus
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=8.0.0
Node Version
8.14.0
NPM Version
6.4.1
Score
64.1
Supply Chain
80
Quality
73.5
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
hm496
Download Statistics
Total Downloads
1,228
Last Day
1
Last Week
4
Last Month
5
Last Year
96
GitHub Statistics
2 Stars
4 Commits
2 Watching
1 Branches
1 Contributors
Package Meta Information
Latest Version
1.0.3
Package Id
think-router-plus@1.0.3
Unpacked Size
9.48 kB
Size
3.37 kB
File Count
6
NPM Version
6.4.1
Node Version
8.14.0
Total Downloads
Cumulative downloads
Total Downloads
1,228
Last day
0%
1
Compared to previous day
Last week
0%
4
Compared to previous week
Last month
-16.7%
5
Compared to previous month
Last year
-31.4%
96
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
5
egg-router-plus for Thinkjs
forked from egg-router-plus 1.3.0
mount RouterPlus
1// src/config/middleware.ts 2import {router} from 'think-router-plus'; 3 4export = [ 5 '...other middlewares', 6 { 7 handle: router, 8 options: { 9 defaultModule: 'home', // default thinkjs Module 10 defaultController: 'index', // default thinkjs Controller 11 defaultAction: 'index', // default thinkjs Action 12 enableDefaultRouter: true, // enable default thinkjs router 13 optimizeHomepageRouter: true, // optimize homepage Router 14 denyModules: [], // deny Modules 15 router: {}, // new Router(options.router) 16 allowed: {}, // router.allowedMethods(options.allowed) 17 } 18 }, 19 'controller' 20];
Features
router.namespace
1// src/config/router.ts 2import {Application} from "thinkjs"; 3import {RouterPlus, nextController} from 'think-router-plus'; 4 5export = [ 6 (router: RouterPlus, app: Application) => { 7 const subRouter = router.namespace('/proxy'); 8 subRouter.all('/api/:url*', nextController("index", "index")); 9 // nextController("controller", "action", "module") 10 } 11];
types
1import * as Router from 'koa-router'; 2import {Application} from "thinkjs"; 3 4interface RouterPlus extends Router { 5 namespace(prefix: string, ...middlewares: ((ctx: Context, next: () => Promise<any>) => any)[]): Router; 6} 7 8declare module "think-router-plus" { 9 export let router: (options: any, app: Application) => Router.IMiddleware; 10 export let nextController: (controller: string, action?: string, module?: string) => Router.IMiddleware; 11}
No vulnerabilities found.
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
Found 0/4 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
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'
Score
3
/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