Installations
npm install match-url-wildcard
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
18.17.0
NPM Version
9.6.7
Score
98.8
Supply Chain
98.7
Quality
81.6
Maintenance
100
Vulnerability
100
License
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
AlexKamaev
Download Statistics
Total Downloads
65,759,605
Last Day
38,768
Last Week
216,822
Last Month
886,889
Last Year
10,883,918
GitHub Statistics
MIT License
13 Stars
39 Commits
5 Forks
8 Watchers
2 Branches
5 Contributors
Updated on Aug 23, 2024
Bundle Size
1.04 kB
Minified
574.00 B
Minified + Gzipped
Package Meta Information
Latest Version
0.0.5
Package Id
match-url-wildcard@0.0.5
Unpacked Size
10.71 kB
Size
2.52 kB
File Count
5
NPM Version
9.6.7
Node Version
18.17.0
Published on
Aug 18, 2023
Total Downloads
Cumulative downloads
Total Downloads
65,759,605
Last Day
3%
38,768
Compared to previous day
Last Week
0.7%
216,822
Compared to previous week
Last Month
39.5%
886,889
Compared to previous month
Last Year
-5.2%
10,883,918
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
3
Match-url-wildcard 
Module to match url by pattern
var rule = 'google.com';
expect(matchUrl('google.com.uk', rule)).to.be.false;
expect(matchUrl('docs.google.com', rule)).to.be.false;
expect(matchUrl('http://docs.google.com', rule)).to.be.false;
expect(matchUrl('https://docs.google.com', rule)).to.be.false;
expect(matchUrl('www.docs.google.com', rule)).to.be.false;
expect(matchUrl('http://docs.ggoogle.com', rule)).to.be.false;
expect(matchUrl('http://goooogle.com', rule)).to.be.false;
expect(matchUrl('gogoogle.com', rule)).to.be.false;
expect(matchUrl('http://google.com', rule)).to.be.true;
expect(matchUrl('https://google.com', rule)).to.be.true;
expect(matchUrl('https://google.com/', rule)).to.be.true;
expect(matchUrl('google.com/', rule)).to.be.true;
rule = 'http://google.com';
expect(matchUrl('https://google.com', rule)).to.be.false;
expect(matchUrl('https://google.com/', rule)).to.be.false;
expect(matchUrl('docs.google.com', rule)).to.be.false;
expect(matchUrl('http://docs.google.com', rule)).to.be.false;
expect(matchUrl('https://docs.google.com', rule)).to.be.false;
expect(matchUrl('www.docs.google.com', rule)).to.be.false;
expect(matchUrl('http://docs.ggoogle.com', rule)).to.be.false;
expect(matchUrl('http://google.com', rule)).to.be.true;
expect(matchUrl('google.com/', rule)).to.be.true;
rule = 'https://google.com';
expect(matchUrl('http://google.com', rule)).to.be.false;
expect(matchUrl('https://google.com', rule)).to.be.true;
['.google.com', '*.google.com']
.forEach(r => {
expect(matchUrl('http://google.com', r)).to.be.false;
expect(matchUrl('https://google.com', r)).to.be.false;
expect(matchUrl('https://google.com/', r)).to.be.false;
expect(matchUrl('google.com/', r)).to.be.false;
expect(matchUrl('http://docs.ggoogle.com', r)).to.be.false;
expect(matchUrl('docs.google.com', r)).to.be.true;
expect(matchUrl('http://docs.google.com', r)).to.be.true;
expect(matchUrl('https://docs.google.com', r)).to.be.true;
expect(matchUrl('www.docs.google.com', r)).to.be.true;
});
['.com', '*.com']
.forEach(r => {
expect(matchUrl('http://google.com.uk', r)).to.be.false;
expect(matchUrl('http://google.com', r)).to.be.true;
expect(matchUrl('google.com/', r)).to.be.true;
expect(matchUrl('docs.google.com', r)).to.be.true;
expect(matchUrl('http://docs.google.com', r)).to.be.true;
expect(matchUrl('www.docs.google.com', r)).to.be.true;
});
['google.', 'google.*']
.forEach(r => {
expect(matchUrl('docs.google.com', r)).to.be.false;
expect(matchUrl('https://docs.google.co.uk', r)).to.be.false;
expect(matchUrl('https://docs.google.uk', r)).to.be.false;
expect(matchUrl('http://google.com', r)).to.be.true;
expect(matchUrl('https://google.co.uk', r)).to.be.true;
expect(matchUrl('google.ru/', r)).to.be.true;
});
['docs.google.', 'docs.google.*']
.forEach(r => {
expect(matchUrl('http://google.com', r)).to.be.false;
expect(matchUrl('docs.google', r)).to.be.false;
expect(matchUrl('https://docs.googlee.com', r)).to.be.false;
expect(matchUrl('www.docs.google.co.uk', r)).to.be.false;
expect(matchUrl('http://docs.ggoogle.com', r)).to.be.false;
expect(matchUrl('http://___docs.google.com', r)).to.be.false;
expect(matchUrl('docs.google.en', r)).to.be.true;
expect(matchUrl('http://docs.google.co.uk', r)).to.be.true;
});
['.google.', '.google.']
.forEach(r => {
expect(matchUrl('http://google.com', r)).to.be.false;
expect(matchUrl('docs.google.com', r)).to.be.true;
expect(matchUrl('http://docs.google.com', r)).to.be.true;
expect(matchUrl('www.docs.google.com', r)).to.be.true;
expect(matchUrl('www.my.docs.google.com', r)).to.be.true;
});
['.docs.google.', '.docs.google.']
.forEach(r => {
expect(matchUrl('http://google.com', r)).to.be.false;
expect(matchUrl('docs.google.com', r)).to.be.false;
expect(matchUrl('http://docs.google.com', r)).to.be.false;
expect(matchUrl('www.docs.google.com', r)).to.be.true;
expect(matchUrl('www.my.docs.google.com.eu', r)).to.be.true;
});
rule = 'docs.*.com';
expect(matchUrl('docs.google.com', rule)).to.be.true;
expect(matchUrl('docs.google.eu.com', rule)).to.be.true;
expect(matchUrl('docs.google.ru', rule)).to.be.false;
expect(matchUrl('docs.google.co.uk', rule)).to.be.false;
rule = 'docs...com';
expect(matchUrl('docs.google.com', rule)).to.be.false;
expect(matchUrl('docs.google.ru', rule)).to.be.false;
expect(matchUrl('my.docs.google.ro.eu.com', rule)).to.be.false;
expect(matchUrl('docs.google.co.uk', rule)).to.be.false;
expect(matchUrl('docs.google.eu.com', rule)).to.be.true;
expect(matchUrl('docs.google.ro.eu.com', rule)).to.be.true;
rule = '.docs...com.';
expect(matchUrl('my.docs.google.eu.com.ru', rule)).to.be.true;
rule = 'docs.g*e.com';
expect(matchUrl('docs.google.com', rule)).to.be.false;
rule = 'localhost';
expect(matchUrl('localhost', rule)).to.be.true;
expect(matchUrl('http://localhost', rule)).to.be.true;
expect(matchUrl('my-localhost', rule)).to.be.false;
expect(matchUrl('localhost-my', rule)).to.be.false;
rule = '127.0.0.1';
expect(matchUrl('127.0.0.1', rule)).to.be.true;
expect(matchUrl('http://127.0.0.1', rule)).to.be.true;
expect(matchUrl('https://127.0.0.1', rule)).to.be.true;
rule = '127.0.0.';
expect(matchUrl('127.127.0.0', rule)).to.be.false;
expect(matchUrl('127.0.0.2', rule)).to.be.true;
rule = '.0.0.';
expect(matchUrl('127.0.1.2', rule)).to.be.false;
expect(matchUrl('127.0.0.2', rule)).to.be.true;
rule = '127...0';
expect(matchUrl('128.120.120.0', rule)).to.be.false;
expect(matchUrl('127.0.0.0', rule)).to.be.true;
expect(matchUrl('127.120.120.0', rule)).to.be.true;
rule = 'google.com:81';
expect(matchUrl('google.com', rule)).to.be.false;
expect(matchUrl('google.com:80', rule)).to.be.false;
expect(matchUrl('google.com:81', rule)).to.be.true;
rule = 'google.:81';
expect(matchUrl('google.com', rule)).to.be.false;
expect(matchUrl('google.com:80', rule)).to.be.false;
expect(matchUrl('google.com:81', rule)).to.be.true;
rule = 'localhost:3000';
expect(matchUrl('localhost:3000/features/functional/local', rule)).to.be.true;
expect(matchUrl('http://localhost:3000/features/functional/local', rule)).to.be.true;
expect(matchUrl(null, rule)).to.be.false;
rule = 1;
expect(matchUrl('google', rule)).to.be.false;

No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
2 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
Reason
Found 3/28 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
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-security-alerts.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/DevExpress/match-url-wildcard/check-security-alerts.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/check-security-alerts.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/DevExpress/match-url-wildcard/check-security-alerts.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-security-alerts.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/DevExpress/match-url-wildcard/check-security-alerts.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-security-alerts.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/DevExpress/match-url-wildcard/check-security-alerts.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-security-alerts.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/DevExpress/match-url-wildcard/check-security-alerts.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/handle-labels.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/DevExpress/match-url-wildcard/handle-labels.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/handle-stale.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/DevExpress/match-url-wildcard/handle-stale.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/handle-stale.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/DevExpress/match-url-wildcard/handle-stale.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/handle-stale.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/DevExpress/match-url-wildcard/handle-stale.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/DevExpress/match-url-wildcard/publish.yml/master?enable=pin
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 4 third-party GitHubAction dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: jobLevel 'contents' permission set to 'write': .github/workflows/check-security-alerts.yml:31
- Warn: jobLevel 'contents' permission set to 'write': .github/workflows/handle-stale.yml:28
- Warn: no topLevel permission defined: .github/workflows/check-security-alerts.yml:1
- Warn: no topLevel permission defined: .github/workflows/handle-labels.yml:1
- Warn: no topLevel permission defined: .github/workflows/handle-stale.yml:1
- Warn: no topLevel permission defined: .github/workflows/publish.yml:1
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'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 8 are checked with a SAST tool
Score
3.3
/10
Last Scanned on 2025-02-10
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