Installations
npm install egg-path-matching
Developer Guide
Typescript
Yes
Module System
ESM
Node Version
18.20.4
NPM Version
10.7.0
Score
95
Supply Chain
85.2
Quality
84.8
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Languages
TypeScript (100%)
Developer
eggjs
Download Statistics
Total Downloads
8,913,427
Last Day
2,352
Last Week
15,900
Last Month
88,559
Last Year
1,130,856
GitHub Statistics
28 Stars
20 Commits
3 Forks
9 Watching
2 Branches
25 Contributors
Bundle Size
4.90 kB
Minified
2.02 kB
Minified + Gzipped
Package Meta Information
Latest Version
2.1.0
Package Id
egg-path-matching@2.1.0
Unpacked Size
14.24 kB
Size
4.30 kB
File Count
11
NPM Version
10.7.0
Node Version
18.20.4
Publised On
18 Sept 2024
Total Downloads
Cumulative downloads
Total Downloads
8,913,427
Last day
-28%
2,352
Compared to previous day
Last week
-29.6%
15,900
Compared to previous week
Last month
-7.1%
88,559
Compared to previous month
Last year
-47.7%
1,130,856
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
egg-path-matching
Installation
1npm install egg-path-matching
Usage
1import { pathMatching } from 'egg-path-matching'; 2 3const options = { 4 ignore: '/api', // string will use parsed by path-to-regexp 5 // support regexp 6 ignore: /^\/api/, 7 // support function 8 ignore: ctx => ctx.path.startsWith('/api'), 9 // support Array 10 ignore: [ ctx => ctx.path.startsWith('/api'), /^\/foo$/, '/bar'], 11 // support match or ignore 12 match: '/api', 13}; 14 15const match = pathMatching(options); 16assert.equal(match({ path: '/api' }), true); 17assert.equal(match({ path: '/api/hello' }), true); 18assert.equal(match({ path: '/api' }), true);
options
match
{String | RegExp | Function | Array} - if request path hitoptions.match
, will returntrue
, otherwise will returnfalse
.ignore
{String | RegExp | Function | Array} - if request path hitoptions.ignore
, will returnfalse
, otherwise will returntrue
.
ignore
and match
can not both be presented.
and if neither ignore
nor match
presented, the new function will always return true
.
License
Contributors
Made with contributors-img.
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
Found 2/20 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.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
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
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 9 are checked with a SAST tool
Score
4.2
/10
Last Scanned on 2025-01-27
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