finds.dev← search

// the find

isaacs/node-glob

★ 8,712 · TypeScript · NOASSERTION · updated Jun 2026

glob functionality for node.js

The canonical glob implementation for Node.js, maintained by Isaac Schlueter (npm's original author). It trades ~10-20% speed against fast-glob for correctness: it matches bash semantics exactly, handles `..` in patterns, extglobs, and edge cases that faster alternatives quietly get wrong. If you need glob behavior that surprises no one, this is the one.

Bash-faithful pattern semantics — `**`, extglobs, `..` traversal, and brace expansion all behave as a shell developer would expect, unlike fast-glob which silently diverges on several of these. The `withFileTypes` option returns path-scurry `Path` objects with stat info, mtime, permissions, and directory listing baked in — useful for filtering without a second stat pass. Glob object caching lets you reuse directory walk results across multiple patterns, which matters if you're doing repeated searches over the same tree. AbortSignal support is genuinely useful for time-bounded searches and is implemented correctly.

The CLI was split out into a separate `glob-bin` package in v13 with no warning in the package name — anyone upgrading from v12 will lose `npx glob` silently. The `includeChildMatches: false` option has a documented race condition where result ordering determines whether child matches get filtered, which makes it unreliable for patterns that might match both ancestor and descendant paths. Windows path handling is genuinely awkward: you must use forward slashes in patterns, and `windowsPathsNoEscape` mode makes literal glob characters unmatchable — a tradeoff the docs acknowledge but that will still catch people. The dependency on path-scurry means you're pulling in a non-trivial abstraction layer for what is fundamentally filesystem traversal.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →