Match files using the patterns the shell uses
open sourceBlueOak-1.0.0free
glob is the npm package for matching files with shell-style glob patterns in Node.js, written in TypeScript by Isaac Z. Schlueter. It offers promise, synchronous, iterator and stream APIs (glob, globSync, globIterate, globStream), takes several patterns at once, supports ignore patterns, cancellation with an AbortSignal, and escaping and unescaping patterns, and guards against regular expression denial of service. It handles Windows paths, with an option to use backslashes as path separators. Its command-line tool moved to the separate glob-bin package. Blue Oak Model License.
Problems it solves
- find all files matching **/*.js in my Node.js script, skipping node_modules
- expand shell wildcard patterns in a JavaScript build tool
- list files by pattern without spawning a shell on Windows
Features
- promise, sync, async iterator and stream APIs
- multiple patterns and ignore patterns in one call
- cancellation with an AbortSignal
- protection against regular expression denial of service
- Windows path handling, with an option for backslash separators
- escape and unescape helpers for patterns
Alternatives
The same job
These do what glob does.
