Gathering detailed insights and metrics for matched
Gathering detailed insights and metrics for matched
Gathering detailed insights and metrics for matched
Gathering detailed insights and metrics for matched
Glob matching with support for multiple patterns and negation. Use `~` in cwd to find files in user home, or `@` for global npm modules.
npm install matched
Typescript
Module System
Min. Node Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
26 Stars
88 Commits
3 Forks
3 Watchers
3 Branches
4 Contributors
Updated on Dec 23, 2024
Latest Version
5.0.1
Package Id
matched@5.0.1
Size
5.42 kB
Published on
Nov 02, 2020
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Adds array support to node-glob, sync and async. Also supports tilde expansion (user home) and resolving to global npm modules.
Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support.
Install with npm (requires Node.js >=10):
1$ npm install --save matched
1const glob = require('matched'); 2// async signature 3glob(patterns[, options]); 4 5// sync signature 6glob.sync(patterns[, options]);
patterns
(string|array) - one or more glob patternsoptions
- options to pass to node-glob;Also note that if non-glob file paths are passed, only paths that exist on the file system will be returned.
promise
1glob(['*.txt']) 2 .then(files => console.log(files)) //=> ['a.txt', 'b.txt', 'c.txt'] 3 .catch(console.error) 4 5// or with async-await 6(async() => { 7 const files = await glob('*.txt'); 8 console.log(files); 9 //=> ['foo.txt', 'bar.txt'] 10})();
callback
1glob(['*.js'], (err, files) => { 2 console.log(files); 3 //=> ['utils.js', 'index.js'] 4});
sync
1const files = glob.sync(['*.js']); 2//=> ['utils.js', 'index.js']
options
All methods take an options object to be forwarded to node-glob as the second argument.
1const files = glob(['*.js'], { cwd: 'test' }); 2console.log(files); 3//=> ['test.js']
options.onMatch()
which is passed to node-glob as a listener for the match
event.options.onFiles()
to allow the user to get the files returned by each glob pattern.cache
property from results array.cache
property on the returned files array. This is a patch release since the property does not change the existing API and should not otherwise effect behavior or results.Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
1$ npm install && npm test
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
1$ npm install -g verbose/verb#dev verb-generate-readme && verb
You might also be interested in these projects:
true
if the given string looks like a glob pattern or an extglob pattern… more | homepageCommits | Contributor |
---|---|
73 | jonschlinkert |
8 | TrySound |
1 | sindresorhus |
Jon Schlinkert
Copyright © 2020, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.8.0, on January 15, 2020.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Score
Last Scanned on 2025-07-07
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