Gathering detailed insights and metrics for glob-possible-parent
Gathering detailed insights and metrics for glob-possible-parent
Gathering detailed insights and metrics for glob-possible-parent
Gathering detailed insights and metrics for glob-possible-parent
npm install glob-possible-parent
Typescript
Module System
Node Version
NPM Version
71
Supply Chain
78.2
Quality
73.4
Maintenance
50
Vulnerability
100
License
JavaScript (100%)
Total Downloads
1,042
Last Day
1
Last Week
4
Last Month
6
Last Year
64
15 Commits
2 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.0
Package Id
glob-possible-parent@1.0.0
Size
6.97 kB
NPM Version
3.7.3
Node Version
5.9.1
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
300%
4
Compared to previous week
Last month
100%
6
Compared to previous month
Last year
-20%
64
Compared to previous year
1
Find out if a path can be a parent of a file you are looking for.
$ npm install glob-possible-parent
This library can be used with a glob matching library (micromatch, minimatch, etc.) to create a matcher that will match not only the given pattern, but also any parent directories. This can be used to optimize glob implementation, and prevent unnecessary disk access, by immediately ruling out directories which can't contain any matching files.
1var gpp = require('glob-possible-parent'); 2var micromatch = require('micromatch'); // you can use any matcher implementation here 3 4// 1. use gpp() to transform the original pattern into an array of patterns which can be passed to the matching library 5// 2. create a RegExp from each pattern 6// 3. join all created RegExps 7 8var gppRegExp = new RegExp('^(?:\\/$|(?:' + gpp('src/js/**/*.js').map(function (pattern) { 9 return micromatch.makeRe(pattern, { dot: true }).toString().slice(1, -1); 10}).join('|') + '))$'); 11 12console.log(gppRegExp.test('src')); // => true 13console.log(gppRegExp.test('src/js')); // => true 14console.log(gppRegExp.test('src/js/x.js')); // => true 15 16console.log(gppRegExp.test('src/css')); // => false
Copyright (c) 2016 Martin Kolárik. Released under the MIT license.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
no SAST tool detected
Details
Reason
Found 0/15 approved changesets -- score normalized to 0
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
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
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