Gathering detailed insights and metrics for @u4/tiny-glob
Gathering detailed insights and metrics for @u4/tiny-glob
Gathering detailed insights and metrics for @u4/tiny-glob
Gathering detailed insights and metrics for @u4/tiny-glob
npm install @u4/tiny-glob
Typescript
Module System
Min. Node Version
Node Version
NPM Version
74.7
Supply Chain
98.5
Quality
75.4
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
128,375
Last Day
88
Last Week
567
Last Month
1,836
Last Year
48,771
MIT License
131 Commits
1 Forks
1 Branches
1 Contributors
Updated on Oct 11, 2022
Minified
Minified + Gzipped
Latest Version
0.3.2
Package Id
@u4/tiny-glob@0.3.2
Unpacked Size
55.56 kB
Size
10.94 kB
File Count
29
NPM Version
8.11.0
Node Version
18.12.0
Cumulative downloads
Total Downloads
Last Day
76%
88
Compared to previous day
Last Week
41.8%
567
Compared to previous week
Last Month
1.8%
1,836
Compared to previous month
Last Year
-30.1%
48,771
Compared to previous year
8
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 @u4/tiny-glob
ExtGlob
)1import glob from '@u4/tiny-glob'; 2// or 3import { async as glob } from '@u4/tiny-glob'; 4// or 5import { glob } from '@u4/tiny-glob'; 6 7(async function(){ 8 let files = await glob('src/*/*.{js,md}'); 9 // => [ ... ] array of matching files 10})();
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.
No security vulnerabilities found.