Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
tinyglobby
Advanced tools
A fast and minimal alternative to globby and fast-glob, meant to behave the same way.
Both globby and fast-glob present some behavior no other globbing lib has, which makes it hard to manually replace with something smaller and better.
This library uses only two subdependencies, compared to globby
's 23
and fast-glob
's 17.
import { glob, globSync } from 'tinyglobby';
await glob(['files/*.ts', '!**/*.d.ts'], { cwd: 'src' });
globSync(['src/**/*.ts'], { ignore: ['**/*.d.ts'] });
glob(patterns: string | string[], options: GlobOptions): Promise<string[]>
: Returns a promise with an array of matches.globSync(patterns: string | string[], options: GlobOptions): string[]
: Returns an array of matches.convertPathToPattern(path: string): string
: Converts a path to a pattern depending on the platform.escapePath(path: string): string
: Escapes a path's special characters depending on the platform.isDynamicPattern(pattern: string, options?: GlobOptions): boolean
: Checks if a pattern is dynamic.patterns
: An array of glob patterns to search for. Defaults to ['**/*']
.ignore
: An array of glob patterns to ignore.cwd
: The current working directory in which to search. Defaults to process.cwd()
.absolute
: Whether to return absolute paths. Defaults to false
.dot
: Whether to allow entries starting with a dot. Defaults to false
.deep
: Maximum depth of a directory. Defaults to Infinity
.followSymbolicLinks
: Whether to traverse and include symbolic links. Defaults to true
.caseSensitiveMatch
: Whether to match in case-sensitive mode. Defaults to true
.expandDirectories
: Whether to expand directories. Disable to best match fast-glob
. Defaults to true
.onlyDirectories
: Enable to only return directories. Disables onlyFiles
if set. Defaults to false
.onlyFiles
: Enable to only return files. Defaults to true
.tinyglobby
is downloaded many times by projects all around the world. Here's a list of notable projects that use it:
vitest
ts-morph
sort-package-json
tsup
cspell
nuxt
vite-plugin-pwa
size-limit
postcss-mixins
unocss
vitepress
pkg.pr.new
FAQs
A fast and minimal alternative to globby and fast-glob
The npm package tinyglobby receives a total of 2,105,065 weekly downloads. As such, tinyglobby popularity was classified as popular.
We found that tinyglobby demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.