Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

tinyglobby

Find files by pattern in Node.js.

Build tools and bundlersNPM

GitHubWebsite

1. License

“Permission is hereby granted, free of charge, to any person obtaining a copy”

MIT allows use in paid and closed-source apps.

github.com/SuperchupuDev/tinyglobby/blob/main/LICENSE

From the package registry and GitHub, checked daily; card checked Nov 11, 2026. Tap a verdict to see its source.How we checkedReport an error

What tinyglobby does

tinyglobby is a small free JavaScript library that finds files in a folder by a pattern like src/**/*.ts. Your build script or tool gets back a list of matching file paths, with tests, hidden files or other folders left out as you ask. It is a lighter stand-in for the older globby and fast-glob libraries.

What people build with it

Pick source files for a build

A build or lint script needs every TypeScript file in src except tests and type files; one call returns that list.

Swap out globby or fast-glob

Your project or a package you maintain uses globby or fast-glob; switching to tinyglobby keeps the same calls with far fewer extra packages to install.

Collect docs pages for a site Idea

A small docs or blog generator gathers every Markdown page in the project, without the ones inside installed packages.

Stop a search that runs long

A tool that searches a big or unknown folder gives up after a second instead of making the user wait.

Folders with brackets in names

A user picks a folder called photos (1) or [draft]; escape its name first so the brackets are read as plain letters, not as pattern signs.

Find hidden config files

A setup checker looks for files like .env or .prettierrc, which a normal search skips because their names start with a dot.

tinyglobby popularity

51 / 100
Gid Score, #1864 overall
317M
downloads a week, npm
549
GitHub stars
5
agent projects use it
tinyglobby: downloads per weeknpm, tinyglobby 317,170,004
tinyglobby: GitHub starsSuperchupuDev/tinyglobby 549

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How tinyglobby is used

  • tinyglobby joined the catalog on its public numbers (317,170,004 downloads a week on npm and 549 GitHub stars), not on our project count: it is a dependency in 12 public GitHub projects of our scan, 5 of them set up for AI coding agents.
  • Projects that use it most often also use yaml (66.7%), chalk (58.3%), tsx (58.3%).

By coding agent

5 projects, 0.2%

Often used with

In 66.7% of its projects
In 58.3% of its projects
In 58.3% of its projects
In 66.7% of its projects
In 41.7% of its projects
In 41.7% of its projects
In 41.7% of its projects

More about tinyglobby

Funding
  • GitHub Sponsors: https://github.com/SuperchupuDev
  • 3 GitHub sponsors

See all

More in Build tools and bundlers

Alternatives

tinyglobby This page

MITGid 51317M/wk

globby

Pick globby when you want .gitignore rules applied for you through its gitignore option, which tinyglobby leaves out.

fast-glob

Pick fast-glob when existing code depends on its exact deep option, which tinyglobby counts in a different way.

glob

Pick glob when you want the long-standing, widely used glob package and size matters less.

Compare tinyglobby with another tool

Get started

Tell your AI assistant

“Use tinyglobby (pin tinyglobby@0.2.17, Node.js 12+) to list the project's files with glob(patterns, { cwd, ignore: ['node_modules/**'] }); set expandDirectories: false, sort the result, and add dot: true only if hidden files should count.”

  1. Add tinyglobby to your project; it runs on Node.js 12 or newer and pulls in only two small helper packages.

    From registry.npmjs.org/tinyglobby/0.2.17

  2. Call glob (returns a promise) or globSync with one pattern or a list; patterns starting with ! leave files out.

    import { glob, globSync } from 'tinyglobby';
    
    await glob(['files/*.ts', '!**/*.d.ts'], { cwd: 'src' });
    globSync('src/**/*.ts', { ignore: '**/*.d.ts' });
    

    From github.com/SuperchupuDev/tinyglobby/blob/main/README.md

  3. Search inside a folder by setting cwd; results come back relative to it unless you turn on absolute.

    import { glob } from 'tinyglobby';
    const files = await glob('src/**', { cwd: './projects/best-cats' });
    

    From superchupu.dev/tinyglobby/documentation

Mistakes to avoid

Switching from fast-glob and keeping the same calls, like glob('src')
Pass expandDirectories: false (it is on by default only to copy globby)

With the default, a folder name expands to every file inside it; our demo got 5 files for glob('src') and [] with expandDirectories: false.

glob({ patterns: ['src/**'] }) (patterns inside the options, the old form)
glob(['src/**'], { ...options }) with the patterns as the first argument

Version 0.2.15 deprecated patterns in the options object; in our run passing both threw "Cannot pass patterns as both an argument and an option".

await glob(`${dir}/*.ts`, { absolute: true }) with no cwd
await glob('*.ts', { absolute: true, cwd: dir })

Patterns that reach outside cwd are slower, and the paths you get back are still worked out from cwd, not from the pattern.

Expecting a pattern with a trailing slash, like src/index.ts/, to match only folders
Use onlyDirectories: true when you want folders only

tinyglobby ignores the trailing slash; in our run 'src/index.ts/' still returned the file src/index.ts.

Treating the result of a glob with signal as complete
Check whether the signal fired (signal.aborted) before trusting the list

When the signal aborts, the search stops and returns what it has without an error; in our run an aborted signal returned [].

Questions

Can I just replace fast-glob with it?

Mostly yes, but set expandDirectories: false, because tinyglobby turns it on by default to match globby.

Does it skip files listed in .gitignore?

No. There is no gitignore option; the migration guide shows a workaround with git ls-files.

If I pass an absolute path as the pattern, do I get absolute paths back?

No. Results are relative to cwd whatever the pattern looks like; turn on absolute: true to get full paths.

Can I search a fake or in-memory folder, for example in tests?

Yes. The fs option takes your own readdir, realpath and stat functions instead of Node's.

Can I use it in a paid product?

Yes, it is MIT licensed; keep its license notice in copies you ship.