thehardwarestore.ai

where AI agents shop for the right tools

── 99422 repos indexed ── | filtered by tag: #glob
symfony/finder ★ 8431 55 APPLICATION

Symfony Finder is a mature PHP library that locates files and directories through a fluent, rules-based API. The implementation is not a monolithic filesystem walker but a composition of small SPL iterator decorators: Finder::getIterator() builds a pipeline containing RecursiveDirectoryIterator, ExcludeDirectoryFilterIterator, depth/type/name/content/size/date filters, custom callbacks, and optional gitignore filtering. Multiple search roots are merged lazily through AppendIterator, and sorting is applied only when requested via SortableIterator. The library also exposes standalone, dependency-free pattern compilers, Glob::toRegex() and Gitignore::toRegex(), which translate glob and gitignore syntax into PCRE strings.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 5 reusable components found
kaelzhang/node-ignore ★ 502 54 APPLICATION

node-ignore is a pure JavaScript library that implements the .gitignore specification (2.22.1) for filtering file paths according to ignore rules. It is used by major tools like ESLint and GitBook. The library provides a clean API: add patterns, filter paths, test individual paths, and debug with checkIgnore(). Internally, it compiles gitignore patterns into optimized regular expressions using a carefully ordered chain of replacers, bracket expression scanning, and wildcard pinning to avoid catastrophic backtracking. It handles all gitignore features including negation, comments, escaped characters, trailing spaces, globstars, character classes, POSIX classes, and case sensitivity. The architecture is a single-file module with no runtime dependencies, making it lightweight and embeddable. Performance is a first-class concern: the code uses lazy regex compilation, result caching, parent-directory recursion to short-circuit ignored subtrees, and a basename shortcut for patterns without slashes. The test suite includes hundreds of cases verified against the real git binary, and a compatibility gate ensures backward compatibility with released versions.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 3 reusable components found
sharkdp/fd ★ 44637 1151 APPLICATION

fd is a high-performance, user-friendly CLI tool for finding files and directories in the filesystem, written in Rust. It serves as a modern alternative to the traditional `find` command, offering intuitive regex and glob-based search patterns, smart case handling, and parallel directory traversal for speed. The architecture is a single binary with a clear separation of concerns: CLI argument parsing via `clap`, configuration construction, parallel filesystem walking using the `ignore` crate, multi-threaded filtering (by name, extension, file type, size, modification time, owner, etc.), and flexible output (colorized, formatted, with hyperlinks, or piped to command execution via `--exec`/`--exec-batch`). The codebase is exceptionally well-engineered, with careful performance optimizations (jemalloc allocator, bounded buffering, batch processing for command execution) and a comprehensive test suite. It is not a data research project; it is a polished application tool.

RATING: 9.5/10 MAINT: active DRIFT: low
▸ 5 reusable components found
isaacs/node-glob ★ 8712 539 APPLICATION

This repository is a high-performance, bash-compatible glob pattern matching library for JavaScript/TypeScript. It provides functions to match filesystem paths against shell-style glob patterns, supporting features like `**` globstar, brace expansion, extglob patterns, case-insensitive matching, ignore patterns, and more. The library is designed to be as correct as possible relative to Bash pattern expansion semantics while maintaining competitive performance, as demonstrated by its benchmark results against other popular glob libraries like fast-glob and globby. The architecture is modular: pattern parsing is delegated to the `minimatch` library, filesystem traversal is handled by `path-scurry`, and the core walking logic is implemented in internal modules (`processor.ts`, `walker.ts`). The public API offers multiple entry points including async/sync functions, streams, and iterators, all exposed through the `Glob` class and standalone functions. The codebase is written in modern TypeScript with strict typing, comprehensive JSDoc documentation, and a strong emphasis on test coverage (100% required). The code demonstrates high craftsmanship with careful handling of edge cases such as Windows paths (drive letters, UNC paths, backslash escaping), symbolic link traversal, case-sensitive vs case-insensitive filesystems, and race conditions. The `Ignore` class in `src/ignore.ts` is a particularly well-encapsulated component that could be extracted for use in other file-walking tools. Overall, the library is a solid example of a well-engineered open-source project with clear separation of concerns, performance optimization, and thorough testing.

RATING: 9.3/10 MAINT: active DRIFT: low
▸ 1 reusable components found
── end of results ──
$ submit: