Gathering detailed insights and metrics for tiny-glob
Gathering detailed insights and metrics for tiny-glob
Gathering detailed insights and metrics for tiny-glob
Gathering detailed insights and metrics for tiny-glob
Super tiny and ~350% faster alternative to node-glob
npm install tiny-glob
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
855 Stars
113 Commits
25 Forks
11 Watching
8 Branches
10 Contributors
Updated on 06 Nov 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-7.3%
281,003
Compared to previous day
Last week
4.1%
1,710,057
Compared to previous week
Last month
11.4%
7,116,600
Compared to previous month
Last year
-39.6%
85,689,316
Compared to previous year
2
Tiny and extremely fast library to match files and folders using glob patterns.
"Globs" is the common name for a specific type of pattern used to match files and folders. It's the patterns you type when you do stuff like ls *.js
in your shell or put src/*
in a .gitignore
file. When used to match filenames, it's sometimes called a "wildcard".
npm install tiny-glob
ExtGlob
)1const glob = require('tiny-glob'); 2 3(async function(){ 4 let files = await glob('src/*/*.{js,md}'); 5 // => [ ... ] array of matching files 6})();
Type: function
Returns: Array
Return array of matching files and folders
This function is async
and returns a promise.
Type: String
The glob pattern to match against.
OBS: Please only use forward-slashes in glob expressions. Even on windows
Type: String
Default: '.'
Change default working directory.
Type: Boolean
Default: false
Allow patterns to match filenames or directories that begin with a period (.
).
Type: Boolean
Default: false
Return matches as absolute paths.
Type: Boolean
Default: false
Skip directories and return matched files only.
Type: Boolean
Default: false
Flush the internal cache object.
Though Windows may use /
, \
, or \\
as path separators, you can only use forward-slashes (/
) when specifying glob expressions. Any back-slashes (\
) will be interpreted as escape characters instead of path separators.
This is common across many glob-based modules; see node-glob
for corroboration.
glob x 13,405 ops/sec ±1.80% (85 runs sampled)
fast-glob x 25,745 ops/sec ±2.76% (59 runs sampled)
tiny-glob x 102,658 ops/sec ±0.79% (91 runs sampled)
Fastest is tiny-glob
┌───────────┬─────────────────────────┬─────────────┬────────────────┐
│ Name │ Mean time │ Ops/sec │ Diff │
├───────────┼─────────────────────────┼─────────────┼────────────────┤
│ glob │ 0.00007459990597268128 │ 13,404.843 │ N/A │
├───────────┼─────────────────────────┼─────────────┼────────────────┤
│ fast-glob │ 0.000038842529587611705 │ 25,744.976 │ 92.06% faster │
├───────────┼─────────────────────────┼─────────────┼────────────────┤
│ tiny-glob │ 0.00000974110141018254 │ 102,657.796 │ 298.75% faster │
└───────────┴─────────────────────────┴─────────────┴────────────────┘
Learn more about advanced globbing
MIT © Terkel Gjervig
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 13/28 approved changesets -- score normalized to 4
Reason
6 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
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
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
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